From c82ee828aa20487d254a5225d256cd422acee459 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 14 May 2010 14:19:35 -0300 Subject: perf report: Report number of events, not samples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-diff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/perf/builtin-diff.c') diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 6dd4bda..a6e2fdc 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -23,9 +23,9 @@ static bool force; static bool show_displacement; static int hists__add_entry(struct hists *self, - struct addr_location *al, u64 count) + struct addr_location *al, u64 period) { - if (__hists__add_entry(self, al, NULL, count) != NULL) + if (__hists__add_entry(self, al, NULL, period) != NULL) return 0; return -ENOMEM; } @@ -50,7 +50,7 @@ static int diff__process_sample_event(event_t *event, struct perf_session *sessi event__parse_sample(event, session->sample_type, &data); if (hists__add_entry(&session->hists, &al, data.period)) { - pr_warning("problem incrementing symbol count, skipping event\n"); + pr_warning("problem incrementing symbol period, skipping event\n"); return -1; } -- cgit v1.1