diff options
author | Namhyung Kim <namhyung@kernel.org> | 2021-04-27 04:37:13 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-04-29 16:30:58 +0300 |
commit | 0f0abbace3cddc92aaed2db3783c9c501354b3be (patch) | |
tree | 1cad6ab950fa6638811303a6412dde390581cf01 /tools/perf/util/hist.h | |
parent | bf8f8587bfb6d1315771a252a1a3be20fda1d783 (diff) | |
download | linux-0f0abbace3cddc92aaed2db3783c9c501354b3be.tar.xz |
perf hists: Split hists_stats from events_stats
Each struct hists have events_stats but most of the fields were not
used. It's to count number of samples and periods whether filtered or
not. And other fields are used only by evlist.
So it'd be better to split hists_stats and events_stats to reduce
wasted memory in the struct hists. This makes the output of event
statistics in the perf report compact by skipping 0 events in each
evsel/hists.
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210427013717.1651674-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r-- | tools/perf/util/hist.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index e2faa745c8d6..6b0f708f08ac 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -96,7 +96,7 @@ struct hists { const char *uid_filter_str; const char *symbol_filter_str; pthread_mutex_t lock; - struct events_stats stats; + struct hists_stats stats; u64 event_stream; u16 col_len[HISTC_NR_COLS]; bool has_callchains; @@ -196,7 +196,7 @@ struct hist_entry *hists__get_entry(struct hists *hists, int idx); u64 hists__total_period(struct hists *hists); void hists__reset_stats(struct hists *hists); void hists__inc_stats(struct hists *hists, struct hist_entry *h); -void hists__inc_nr_events(struct hists *hists, u32 type); +void hists__inc_nr_events(struct hists *hists); void hists__inc_nr_samples(struct hists *hists, bool filtered); size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, |