OSDN Git Service

perf symbols: Bit pack to save a byte
authorIan Rogers <irogers@google.com>
Fri, 12 Nov 2021 03:51:23 +0000 (19:51 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 13 Nov 2021 21:11:51 +0000 (18:11 -0300)
Use a bit field alongside the earlier bit fields.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Martin Liška <mliska@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20211112035124.94327-2-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/annotate.c
tools/perf/util/symbol.h

index 8511af5..5d98293 100644 (file)
@@ -3132,7 +3132,7 @@ int symbol__annotate2(struct map_symbol *ms, struct evsel *evsel,
        notes->nr_events = nr_pcnt;
 
        annotation__update_column_widths(notes);
-       sym->annotate2 = true;
+       sym->annotate2 = 1;
 
        return 0;
 
index 3586fa5..fbf866d 100644 (file)
@@ -62,10 +62,10 @@ struct symbol {
        u8              ignore:1;
        /** Symbol for an inlined function. */
        u8              inlined:1;
+       /** Has symbol__annotate2 been performed. */
+       u8              annotate2:1;
        /** Architecture specific. Unused except on PPC where it holds st_other. */
        u8              arch_sym;
-       /** Has symbol__annotate2 been performed. */
-       bool            annotate2;
        /** The name of length namelen associated with the symbol. */
        char            name[];
 };