Skip to content

Commit 1b29ac5

Browse files
kliang2acmel
authored andcommitted
perf session: Don't call dump_sample() when evsel is NULL
Need to check evsel before passing it to dump_sample(). Signed-off-by: Kan Liang <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent f83b6b6 commit 1b29ac5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,11 +1080,11 @@ static int machines__deliver_event(struct machines *machines,
10801080

10811081
switch (event->header.type) {
10821082
case PERF_RECORD_SAMPLE:
1083-
dump_sample(evsel, event, sample);
10841083
if (evsel == NULL) {
10851084
++evlist->stats.nr_unknown_id;
10861085
return 0;
10871086
}
1087+
dump_sample(evsel, event, sample);
10881088
if (machine == NULL) {
10891089
++evlist->stats.nr_unprocessable_samples;
10901090
return 0;

0 commit comments

Comments
 (0)