summaryrefslogtreecommitdiff
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-12-22 07:44:09 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-01-21 19:24:32 +0300
commit590cd344e2099c7b040b29d3a711b4c26358def5 (patch)
treee8b6b9f87901c33a1418f54fac043b39ddc57c7b /tools/perf/util/hist.c
parent956b65e1a7a6f10e630ee7f2f2f9de3aab001527 (diff)
downloadlinux-590cd344e2099c7b040b29d3a711b4c26358def5.tar.xz
perf report: Get rid of report__inc_stat()
The report__inc_stat() function collects the number of hist entries in the session in order to calculate the max size of the progess bar. It'd be better if it does it during the addition of hist entries so that it can be used by other places too. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1419223455-4362-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 038483a24a54..e17163fcb702 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -429,6 +429,8 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
if (!he)
return NULL;
+ hists->nr_entries++;
+
rb_link_node(&he->rb_node_in, parent, p);
rb_insert_color(&he->rb_node_in, hists->entries_in);
out: