• Arnaldo Carvalho de Melo's avatar
    libbeauty: Hook up the x86 irq_vectors table generator · f19a85c6
    Arnaldo Carvalho de Melo authored
    I.e. after running:
    
      $ make -C tools/perf O=/tmp/build/perf
    
    We end up with:
    
      $ cat /tmp/build/perf/trace/beauty/generated/x86_arch_irq_vectors_array.c
      static const char *x86_irq_vectors[] = {
      	[0x02] = "NMI",
      	[0x12] = "MCE",
      	[0x20] = "IRQ_MOVE_CLEANUP",
      	[0x80] = "IA32_SYSCALL",
      	[0xec] = "LOCAL_TIMER",
      	[0xed] = "HYPERV_STIMER0",
      	[0xee] = "HYPERV_REENLIGHTENMENT",
      	[0xef] = "MANAGED_IRQ_SHUTDOWN",
      	[0xf0] = "POSTED_INTR_NESTED",
      	[0xf1] = "POSTED_INTR_WAKEUP",
      	[0xf2] = "POSTED_INTR",
      	[0xf3] = "HYPERVISOR_CALLBACK",
      	[0xf4] = "DEFERRED_ERROR",
      	[0xf6] = "IRQ_WORK",
      	[0xf7] = "X86_PLATFORM_IPI",
      	[0xf8] = "REBOOT",
      	[0xf9] = "THRESHOLD_APIC",
      	[0xfa] = "THERMAL_APIC",
      	[0xfb] = "CALL_FUNCTION_SINGLE",
      	[0xfc] = "CALL_FUNCTION",
      	[0xfd] = "RESCHEDULE",
      	[0xfe] = "ERROR_APIC",
      	[0xff] = "SPURIOUS_APIC",
      };
      $
    
    Now its just a matter of using it, associating it to tracepoint arguments named
    'vector', all of which can be correctly used with this table, for int args.
    
    At some point we should move tools/perf/trace/beauty to tools/beauty/,
    so that it can be used more generally and even made available externally
    like libbpf, libperf, libtraceevent, etc.
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Link: https://lkml.kernel.org/n/tip-0p2df4kq1afrxbck4e4ct34r@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    f19a85c6
Makefile.perf 36.1 KB