]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf annotate-data: Add annotated_data_type__get_member_name()
authorNamhyung Kim <namhyung@kernel.org>
Mon, 10 Mar 2025 22:49:19 +0000 (15:49 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 13 Mar 2025 07:19:51 +0000 (00:19 -0700)
commitce2289ad0a2102f73d2b2b100f4dcf13021cf05b
tree1e2b2520d6ab7416be8497b24a54ff6f6c0e911c
parente1cde2d5e92f6728a022754650b9cb1e38358d50
perf annotate-data: Add annotated_data_type__get_member_name()

Factor out a function to get the name of member field at the given
offset.  This will be used in other places.

Also update the output of typeoff sort key a little bit.  As we know
that some special types like (stack operation), (stack canary) and
(unknown) won't have fields, skip printing the offset and field.

For example, the following change is expected.

  "(stack operation) +0 (no field)"   ==>   "(stack operation)"

Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250310224925.799005-2-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/annotate-data.c
tools/perf/util/annotate-data.h
tools/perf/util/sort.c