diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-12-21 23:44:09 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-01-21 11:24:32 -0500 |
commit | 590cd344e2099c7b040b29d3a711b4c26358def5 (patch) | |
tree | e8b6b9f87901c33a1418f54fac043b39ddc57c7b /tools/perf/util/hist.c | |
parent | 956b65e1a7a6f10e630ee7f2f2f9de3aab001527 (diff) |
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.c | 2 |
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, | |||
429 | if (!he) | 429 | if (!he) |
430 | return NULL; | 430 | return NULL; |
431 | 431 | ||
432 | hists->nr_entries++; | ||
433 | |||
432 | rb_link_node(&he->rb_node_in, parent, p); | 434 | rb_link_node(&he->rb_node_in, parent, p); |
433 | rb_insert_color(&he->rb_node_in, hists->entries_in); | 435 | rb_insert_color(&he->rb_node_in, hists->entries_in); |
434 | out: | 436 | out: |