Skip to content

Commit 2e2967f

Browse files
ahunter6acmel
authored andcommitted
perf auxtrace: Prevent decoding when --no-itrace
Prevent auxtrace_queues__process_index() from queuing AUX area data for decoding when the --no-itrace option has been used. Signed-off-by: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 40c2189 commit 2e2967f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tools/perf/util/auxtrace.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
#include "sane_ctype.h"
6161
#include "symbol/kallsyms.h"
6262

63+
static bool auxtrace__dont_decode(struct perf_session *session)
64+
{
65+
return !session->itrace_synth_opts ||
66+
session->itrace_synth_opts->dont_decode;
67+
}
68+
6369
int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
6470
struct auxtrace_mmap_params *mp,
6571
void *userpg, int fd)
@@ -762,6 +768,9 @@ int auxtrace_queues__process_index(struct auxtrace_queues *queues,
762768
size_t i;
763769
int err;
764770

771+
if (auxtrace__dont_decode(session))
772+
return 0;
773+
765774
list_for_each_entry(auxtrace_index, &session->auxtrace_index, list) {
766775
for (i = 0; i < auxtrace_index->nr; i++) {
767776
ent = &auxtrace_index->entries[i];
@@ -892,12 +901,6 @@ int perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr,
892901
return err;
893902
}
894903

895-
static bool auxtrace__dont_decode(struct perf_session *session)
896-
{
897-
return !session->itrace_synth_opts ||
898-
session->itrace_synth_opts->dont_decode;
899-
}
900-
901904
int perf_event__process_auxtrace_info(struct perf_tool *tool __maybe_unused,
902905
union perf_event *event,
903906
struct perf_session *session)

0 commit comments

Comments
 (0)