perf trace beauty: Add the glue for the autogenerated x86 IRQ vector array
We need to wrap this autogenerated string array with the strarray__scnprintf() formatter and the strarray__strotul() lookup method, do it. 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-bx2cjcyv6aerhyy3gvu3uwcy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Родитель
97c2a7806f
Коммит
573ed8985d
|
@ -122,6 +122,12 @@ unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx);
|
|||
size_t syscall_arg__scnprintf_strarray_flags(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_STRARRAY_FLAGS syscall_arg__scnprintf_strarray_flags
|
||||
|
||||
size_t syscall_arg__scnprintf_x86_irq_vectors(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_X86_IRQ_VECTORS syscall_arg__scnprintf_x86_irq_vectors
|
||||
|
||||
bool syscall_arg__strtoul_x86_irq_vectors(char *bf, size_t size, struct syscall_arg *arg, u64 *ret);
|
||||
#define STUL_X86_IRQ_VECTORS syscall_arg__strtoul_x86_irq_vectors
|
||||
|
||||
size_t syscall_arg__scnprintf_x86_MSR(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_X86_MSR syscall_arg__scnprintf_x86_MSR
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
perf-y += x86_irq_vectors.o
|
||||
perf-y += x86_msr.o
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// SPDX-License-Identifier: LGPL-2.1
|
||||
/*
|
||||
* trace/beauty/x86_irq_vectors.c
|
||||
*
|
||||
* Copyright (C) 2019, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
*/
|
||||
|
||||
#include "trace/beauty/beauty.h"
|
||||
|
||||
#include "trace/beauty/generated/x86_arch_irq_vectors_array.c"
|
||||
|
||||
static DEFINE_STRARRAY(x86_irq_vectors, "_VECTOR");
|
||||
|
||||
static size_t x86_irq_vectors__scnprintf(unsigned long vector, char *bf, size_t size, bool show_prefix)
|
||||
{
|
||||
return strarray__scnprintf_suffix(&strarray__x86_irq_vectors, bf, size, "%#x", show_prefix, vector);
|
||||
}
|
||||
|
||||
size_t syscall_arg__scnprintf_x86_irq_vectors(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
unsigned long vector = arg->val;
|
||||
|
||||
return x86_irq_vectors__scnprintf(vector, bf, size, arg->show_string_prefix);
|
||||
}
|
||||
|
||||
bool syscall_arg__strtoul_x86_irq_vectors(char *bf, size_t size, struct syscall_arg *arg __maybe_unused, u64 *ret)
|
||||
{
|
||||
return strarray__strtoul(&strarray__x86_irq_vectors, bf, size, ret);
|
||||
}
|
Загрузка…
Ссылка в новой задаче