diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-14 13:19:35 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-14 13:19:35 -0400 |
commit | c82ee828aa20487d254a5225d256cd422acee459 (patch) | |
tree | 6f8132442237bc4f2393e04a5f30b3711a8f91ca /tools/perf/builtin-diff.c | |
parent | cee75ac7ecc27084accdb9d9d6fde65a09f047ae (diff) |
perf report: Report number of events, not samples
Number of samples is meaningless after we switched to auto-freq, so
report the number of events, i.e. not the sum of the different periods,
but the number PERF_RECORD_SAMPLE emitted by the kernel.
While doing this I noticed that naming "count" to the sum of all the
event periods can be confusing, so rename it to .period, just like in
struct sample.data, so that we become more consistent.
This helps with the next step, that was to record in struct hist_entry
the number of sample events for each instance, we need that because we
use it to generate the number of events when applying filters to the
tree of hist entries like it is being done in the TUI report browser.
Suggested-by: Ingo Molnar <mingo@elte.hu>
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-diff.c')
-rw-r--r-- | tools/perf/builtin-diff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 6dd4bdae8a87..a6e2fdc7a04e 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -23,9 +23,9 @@ static bool force; | |||
23 | static bool show_displacement; | 23 | static bool show_displacement; |
24 | 24 | ||
25 | static int hists__add_entry(struct hists *self, | 25 | static int hists__add_entry(struct hists *self, |
26 | struct addr_location *al, u64 count) | 26 | struct addr_location *al, u64 period) |
27 | { | 27 | { |
28 | if (__hists__add_entry(self, al, NULL, count) != NULL) | 28 | if (__hists__add_entry(self, al, NULL, period) != NULL) |
29 | return 0; | 29 | return 0; |
30 | return -ENOMEM; | 30 | return -ENOMEM; |
31 | } | 31 | } |
@@ -50,7 +50,7 @@ static int diff__process_sample_event(event_t *event, struct perf_session *sessi | |||
50 | event__parse_sample(event, session->sample_type, &data); | 50 | event__parse_sample(event, session->sample_type, &data); |
51 | 51 | ||
52 | if (hists__add_entry(&session->hists, &al, data.period)) { | 52 | if (hists__add_entry(&session->hists, &al, data.period)) { |
53 | pr_warning("problem incrementing symbol count, skipping event\n"); | 53 | pr_warning("problem incrementing symbol period, skipping event\n"); |
54 | return -1; | 54 | return -1; |
55 | } | 55 | } |
56 | 56 | ||