[tip:perf/urgent] perf session: Don't count per evsel events

From: tip-bot for Arnaldo Carvalho de Melo
Date: Wed Oct 15 2014 - 06:03:51 EST


Commit-ID: c2329ade22844054f4dce79fb9358d8f9f0421a5
Gitweb: http://git.kernel.org/tip/c2329ade22844054f4dce79fb9358d8f9f0421a5
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
AuthorDate: Fri, 10 Oct 2014 15:12:15 -0300
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Fri, 10 Oct 2014 15:15:32 -0300

perf session: Don't count per evsel events

PERF_RECORD_SAMPLE was not being counted here and is the only per-evsel
thing anyway, the other events were not mapping to a evsel.

With this we don't require that evsels used with a perf_session need to
have space for hists, like the ones in annotate, report, top.

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Don Zickus <dzickus@xxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Jean Pihet <jean.pihet@xxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-kzchpz0l1mhrsfpkirz086m2@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/session.c | 16 ----------------
1 file changed, 16 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 1d42354..66cae50 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -813,22 +813,6 @@ int perf_session__deliver_event(struct perf_session *session,
dump_event(session, event, file_offset, sample);

evsel = perf_evlist__id2evsel(session->evlist, sample->id);
- if (evsel != NULL && event->header.type != PERF_RECORD_SAMPLE) {
- /*
- * XXX We're leaving PERF_RECORD_SAMPLE unnacounted here
- * because the tools right now may apply filters, discarding
- * some of the samples. For consistency, in the future we
- * should have something like nr_filtered_samples and remove
- * the sample->period from total_sample_period, etc, KISS for
- * now tho.
- *
- * Also testing against NULL allows us to handle files without
- * attr.sample_id_all and/or without PERF_SAMPLE_ID. In the
- * future probably it'll be a good idea to restrict event
- * processing via perf_session to files with both set.
- */
- hists__inc_nr_events(evsel__hists(evsel), event->header.type);
- }

machine = perf_session__find_machine_for_cpumode(session, event,
sample);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/