summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-diff.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-04-24 16:37:26 +0900
committerJiri Olsa <jolsa@kernel.org>2014-04-24 16:31:25 +0200
commit9283ba9bd77a6940ecad8721429131d773c704b8 (patch)
treeefa5bfd5cf02d5043ff0e6f3e387576ff208d662 /tools/perf/builtin-diff.c
parentae993efc9c6bd109b027d2799a442892067e9230 (diff)
perf hists: Add a couple of hists stat helper functions
Add hists__{reset,inc}_[filter_]stats() functions to cleanup accesses to hist stats (for output). Note that number of samples in the stat is not handled here since it belongs to the input stage. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1398327843-31845-5-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r--tools/perf/builtin-diff.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index c9cc771f182a..52d91ac4e6c8 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -573,10 +573,7 @@ static void hists__compute_resort(struct hists *hists)
hists->entries = RB_ROOT;
next = rb_first(root);
- hists->nr_entries = 0;
- hists->nr_non_filtered_entries = 0;
- hists->stats.total_period = 0;
- hists->stats.total_non_filtered_period = 0;
+ hists__reset_stats(hists);
hists__reset_col_len(hists);
while (next != NULL) {