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