aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-10-09 13:13:41 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-10-09 13:13:41 -0300
commit4ea062ed431d00153af0ac370cb6fef0620e5fa1 (patch)
treec4e7ad89b37d57751802524212291d1a8a89b7e3 /tools/perf/util/session.c
parentperf script: Stop updating hists stats, not used (diff)
downloadlinux-dev-4ea062ed431d00153af0ac370cb6fef0620e5fa1.tar.xz
linux-dev-4ea062ed431d00153af0ac370cb6fef0620e5fa1.zip
perf evsel: Add hists helper
Not all tools need a hists instance per perf_evsel, so lets pave the way to remove evsel->hists while leaving a way to access the hists from a specially allocated evsel, one that comes with space at the end where lives the evsel. 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-qlktkhe31w4mgtbd84035sr2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 883406f4b381..1d423548862f 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -827,7 +827,7 @@ int perf_session__deliver_event(struct perf_session *session,
* 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, event->header.type);
+ hists__inc_nr_events(evsel__hists(evsel), event->header.type);
}
machine = perf_session__find_machine_for_cpumode(session, event,
@@ -1398,7 +1398,7 @@ size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp)
evlist__for_each(session->evlist, pos) {
ret += fprintf(fp, "%s stats:\n", perf_evsel__name(pos));
- ret += events_stats__fprintf(&pos->hists.stats, fp);
+ ret += events_stats__fprintf(&evsel__hists(pos)->stats, fp);
}
return ret;