[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211112035124.94327-2-irogers@google.com>
Date: Thu, 11 Nov 2021 19:51:23 -0800
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
"Martin Liška" <mliska@...e.cz>,
James Clark <james.clark@....com>,
Kajol Jain <kjain@...ux.ibm.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: eranian@...gle.com, Ian Rogers <irogers@...gle.com>
Subject: [PATCH 2/3] perf symbols: Bit pack to save a byte
Use a bit field alongside the earlier bit fields.
Signed-off-by: Ian Rogers <irogers@...gle.com>
---
tools/perf/util/annotate.c | 2 +-
tools/perf/util/symbol.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 8511af55fc3a..5d982933b3a2 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -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;
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 3586fa549f44..fbf866d82dcc 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -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[];
};
--
2.34.0.rc1.387.gb447b232ab-goog
Powered by blists - more mailing lists