Skip to content

Commit

Permalink
perf scripting perl: Do not die() when not founding event for a type
Browse files Browse the repository at this point in the history
Do just like handling other cases i.e. print some debug message and
ignore the sample.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-t7kzlm3cxyvbd7d9n9554ai9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Jan 26, 2017
1 parent e28ff1a commit 0a87e7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/perf/util/scripting-engines/trace-event-perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,10 @@ static void perl_process_tracepoint(struct perf_sample *sample,
if (evsel->attr.type != PERF_TYPE_TRACEPOINT)
return;

if (!event)
die("ug! no event found for type %" PRIu64, (u64)evsel->attr.config);
if (!event) {
pr_debug("ug! no event found for type %" PRIu64, (u64)evsel->attr.config);
return;
}

pid = raw_field_value(event, "common_pid", data);

Expand Down

0 comments on commit 0a87e7b

Please sign in to comment.