linux/tools/perf/ui/browsers
Namhyung Kim 7a5c217024 perf annotate-data: Show offset and size in hex
It'd be better to have them in hex to check cacheline alignment.

 Percent     offset       size  field
  100.00          0      0x1c0  struct cfs_rq    {
    0.00          0       0x10      struct load_weight  load {
    0.00          0        0x8          long unsigned int       weight;
    0.00        0x8        0x4          u32     inv_weight;
                                    };
    0.00       0x10        0x4      unsigned int        nr_running;
   14.56       0x14        0x4      unsigned int        h_nr_running;
    0.00       0x18        0x4      unsigned int        idle_nr_running;
    0.00       0x1c        0x4      unsigned int        idle_h_nr_running;
  ...

Committer notes:

Justification from Namhyung when asked about why it would be "better":

Cache line sizes are power of 2 so it'd be natural to use hex and
check whether an offset is in the same boundary.  Also 'perf annotate'
shows instruction offsets in hex.

>
> Maybe this should be selectable?

I can add an option and/or a config if you want.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240819233603.54941-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-08-21 11:48:39 -03:00
..
annotate-data.c perf annotate-data: Show offset and size in hex 2024-08-21 11:48:39 -03:00
annotate.c perf annotate: Display the branch counter histogram 2024-08-14 10:20:40 -03:00
Build perf ui: Make ui its own library 2024-06-26 11:06:34 -07:00
header.c perf tools: Remove debug.h from places where it is not needed 2019-09-20 09:19:20 -03:00
hists.c perf annotate: Display the branch counter histogram 2024-08-14 10:20:40 -03:00
hists.h perf ui/browser/annotate: Use global annotation_options 2023-12-07 17:18:06 -03:00
map.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
map.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
res_sample.c perf: script: prefer capstone to XED 2024-02-20 18:07:34 -08:00
scripts.c perf: script: prefer capstone to XED 2024-02-20 18:07:34 -08:00