xref: /openbmc/linux/arch/x86/xen/trace.c (revision c796f213)
1 #include <linux/ftrace.h>
2 
3 #define N(x)	[__HYPERVISOR_##x] = "("#x")"
4 static const char *xen_hypercall_names[] = {
5 	N(set_trap_table),
6 	N(mmu_update),
7 	N(set_gdt),
8 	N(stack_switch),
9 	N(set_callbacks),
10 	N(fpu_taskswitch),
11 	N(sched_op_compat),
12 	N(dom0_op),
13 	N(set_debugreg),
14 	N(get_debugreg),
15 	N(update_descriptor),
16 	N(memory_op),
17 	N(multicall),
18 	N(update_va_mapping),
19 	N(set_timer_op),
20 	N(event_channel_op_compat),
21 	N(xen_version),
22 	N(console_io),
23 	N(physdev_op_compat),
24 	N(grant_table_op),
25 	N(vm_assist),
26 	N(update_va_mapping_otherdomain),
27 	N(iret),
28 	N(vcpu_op),
29 	N(set_segment_base),
30 	N(mmuext_op),
31 	N(acm_op),
32 	N(nmi_op),
33 	N(sched_op),
34 	N(callback_op),
35 	N(xenoprof_op),
36 	N(event_channel_op),
37 	N(physdev_op),
38 	N(hvm_op),
39 
40 /* Architecture-specific hypercall definitions. */
41 	N(arch_0),
42 	N(arch_1),
43 	N(arch_2),
44 	N(arch_3),
45 	N(arch_4),
46 	N(arch_5),
47 	N(arch_6),
48 	N(arch_7),
49 };
50 #undef N
51 
52 static const char *xen_hypercall_name(unsigned op)
53 {
54 	if (op < ARRAY_SIZE(xen_hypercall_names) && xen_hypercall_names[op] != NULL)
55 		return xen_hypercall_names[op];
56 
57 	return "";
58 }
59 
60 #define CREATE_TRACE_POINTS
61 #include <trace/events/xen.h>
62