diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2019-11-15 14:42:19 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-22 10:48:13 -0300 |
commit | b04b8dd1e4265525dbd74647f747e63e85540189 (patch) | |
tree | 3663d6706ceffbe01c32d2b6d8260cd6f6bce0bb /tools/perf/util/session.c | |
parent | ba2675bf15fc3ec1d54b9bf938cf5b28392f79fb (diff) |
perf auxtrace: Add support for dumping AUX area samples
Add support for dumping AUX area samples i.e. via the perf script/report
-D (--dump-raw-trace) option.
Committer notes:
Add __maybe_unused to the two args for auxtrace__dump_auxtrace_sample()
for when we don't HAVE_AUXTRACE_SUPPORT.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20191115124225.5247-10-adrian.hunter@intel.com
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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index dbdb47624dec..ab4dae1efea3 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1496,8 +1496,13 @@ static int perf_session__deliver_event(struct perf_session *session, if (ret > 0) return 0; - return machines__deliver_event(&session->machines, session->evlist, - event, &sample, tool, file_offset); + ret = machines__deliver_event(&session->machines, session->evlist, + event, &sample, tool, file_offset); + + if (dump_trace && sample.aux_sample.size) + auxtrace__dump_auxtrace_sample(session, &sample); + + return ret; } static s64 perf_session__process_user_event(struct perf_session *session, |