diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-10 14:12:15 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-10 14:15:32 -0400 |
commit | c2329ade22844054f4dce79fb9358d8f9f0421a5 (patch) | |
tree | 41b720af62f440d039a0488a0305a256bee4cb3b /tools | |
parent | 4ea062ed431d00153af0ac370cb6fef0620e5fa1 (diff) |
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@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-kzchpz0l1mhrsfpkirz086m2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/session.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 1d423548862f..66cae50b5c4c 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, | |||
813 | dump_event(session, event, file_offset, sample); | 813 | dump_event(session, event, file_offset, sample); |
814 | 814 | ||
815 | evsel = perf_evlist__id2evsel(session->evlist, sample->id); | 815 | evsel = perf_evlist__id2evsel(session->evlist, sample->id); |
816 | if (evsel != NULL && event->header.type != PERF_RECORD_SAMPLE) { | ||
817 | /* | ||
818 | * XXX We're leaving PERF_RECORD_SAMPLE unnacounted here | ||
819 | * because the tools right now may apply filters, discarding | ||
820 | * some of the samples. For consistency, in the future we | ||
821 | * should have something like nr_filtered_samples and remove | ||
822 | * the sample->period from total_sample_period, etc, KISS for | ||
823 | * now tho. | ||
824 | * | ||
825 | * Also testing against NULL allows us to handle files without | ||
826 | * attr.sample_id_all and/or without PERF_SAMPLE_ID. In the | ||
827 | * future probably it'll be a good idea to restrict event | ||
828 | * processing via perf_session to files with both set. | ||
829 | */ | ||
830 | hists__inc_nr_events(evsel__hists(evsel), event->header.type); | ||
831 | } | ||
832 | 816 | ||
833 | machine = perf_session__find_machine_for_cpumode(session, event, | 817 | machine = perf_session__find_machine_for_cpumode(session, event, |
834 | sample); | 818 | sample); |