• Arnaldo Carvalho de Melo's avatar
    perf trace: Remove arg_fmt->is_enum, we can get that from the BTF type · c3d74713
    Arnaldo Carvalho de Melo authored
    This is to pave the way for other BTF types, i.e. we try to find BTF
    type then use things like btf_is_enum(btf_type) that we cached to find
    the right strtoul and scnprintf routines.
    
    For now only enum is supported, all the other types simple return zero
    for scnprintf which makes it have the same behaviour as when BTF isn't
    available, i.e. fallback to no pretty printing. Ditto for strtoul.
    
      root@x1:~# perf test -v enum
      124: perf trace enum augmentation tests                              : Ok
      root@x1:~# perf test -v enum
      124: perf trace enum augmentation tests                              : Ok
      root@x1:~# perf test -v enum
      124: perf trace enum augmentation tests                              : Ok
      root@x1:~# perf test -v enum
      124: perf trace enum augmentation tests                              : Ok
      root@x1:~# perf test -v enum
      124: perf trace enum augmentation tests                              : Ok
      root@x1:~#
    Signed-off-by: default avatarHoward Chu <howardchu95@gmail.com>
    Tested-by: default avatarHoward Chu <howardchu95@gmail.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Howard Chu <howardchu95@gmail.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Link: https://lore.kernel.org/r/20240624181345.124764-9-howardchu95@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    c3d74713
builtin-trace.c 150 KB