trace.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #include <linux/ftrace.h>
  2. #include <xen/interface/xen.h>
  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. /* Architecture-specific hypercall definitions. */
  40. N(arch_0),
  41. N(arch_1),
  42. N(arch_2),
  43. N(arch_3),
  44. N(arch_4),
  45. N(arch_5),
  46. N(arch_6),
  47. N(arch_7),
  48. };
  49. #undef N
  50. static const char *xen_hypercall_name(unsigned op)
  51. {
  52. if (op < ARRAY_SIZE(xen_hypercall_names) && xen_hypercall_names[op] != NULL)
  53. return xen_hypercall_names[op];
  54. return "";
  55. }
  56. #define CREATE_TRACE_POINTS
  57. #include <trace/events/xen.h>