From: Arnaldo Carvalho de Melo Date: Tue, 24 Jan 2017 16:19:06 +0000 (-0300) Subject: perf scripting perl: Do not die() when not founding event for a type X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0a87e7bc6c55dd248270ee0ab4212cd0ef8ea04a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf scripting perl: Do not die() when not founding event for a type Do just like handling other cases i.e. print some debug message and ignore the sample. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-t7kzlm3cxyvbd7d9n9554ai9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index e55a132f69b7..014ecd6f67c4 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c @@ -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);