aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-05-28 14:12:18 +0900
committerJiri Olsa <jolsa@kernel.org>2014-06-01 14:34:55 +0200
commit1844dbcbe78503e0f4a8996d69da725d5e7a5177 (patch)
treee1858b5bd3c1fb9a2638d366a9e1c790e5e654b6 /tools/perf/builtin-report.c
parentMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (diff)
downloadlinux-dev-1844dbcbe78503e0f4a8996d69da725d5e7a5177.tar.xz
linux-dev-1844dbcbe78503e0f4a8996d69da725d5e7a5177.zip
perf tools: Introduce hists__inc_nr_samples()
There're some duplicate code for counting number of samples. Add hists__inc_nr_samples() and reuse it. Suggested-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1401335910-16832-2-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index bc0eec1ce4be..4a3b84dd4f41 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -92,9 +92,7 @@ static void report__inc_stats(struct report *rep, struct hist_entry *he)
* counted in perf_session_deliver_event(). The dump_trace
* requires this info is ready before going to the output tree.
*/
- hists__inc_nr_events(he->hists, PERF_RECORD_SAMPLE);
- if (!he->filtered)
- he->hists->stats.nr_non_filtered_samples++;
+ hists__inc_nr_samples(he->hists, he->filtered);
}
static int report__add_mem_hist_entry(struct report *rep, struct addr_location *al,