diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-14 09:36:42 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-14 09:36:42 -0400 |
commit | c8446b9bdabcb0caa61bb341bd73c58f7104b503 (patch) | |
tree | b2530bfbbd893017e9515bd48f2ffa8845860759 /tools/perf/builtin-report.c | |
parent | 5d2be7cb198a0a6bc6088d3806fb7261b184ad89 (diff) |
perf hist: Make event__totals per hists
This is one more thing that started global but are more useful per hist
or per session.
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 04de3387de3..f13cda1ef05 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -139,6 +139,12 @@ static int add_event_total(struct perf_session *session, | |||
139 | return -ENOMEM; | 139 | return -ENOMEM; |
140 | 140 | ||
141 | hists->stats.total += data->period; | 141 | hists->stats.total += data->period; |
142 | /* | ||
143 | * FIXME: add_event_total should be moved from here to | ||
144 | * perf_session__process_event so that the proper hist is passed to | ||
145 | * the event_op methods. | ||
146 | */ | ||
147 | hists__inc_nr_events(hists, PERF_RECORD_SAMPLE); | ||
142 | session->hists.stats.total += data->period; | 148 | session->hists.stats.total += data->period; |
143 | return 0; | 149 | return 0; |
144 | } | 150 | } |
@@ -293,7 +299,7 @@ static int __cmd_report(void) | |||
293 | goto out_delete; | 299 | goto out_delete; |
294 | 300 | ||
295 | if (dump_trace) { | 301 | if (dump_trace) { |
296 | event__print_totals(); | 302 | perf_session__fprintf_nr_events(session, stdout); |
297 | goto out_delete; | 303 | goto out_delete; |
298 | } | 304 | } |
299 | 305 | ||