perf scripting perl: Do not die() when not founding event for a type
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 0a87e7bc6c55dd248270ee0ab4212cd0ef8ea04a Gitweb: http://git.kernel.org/tip/0a87e7bc6c55dd248270ee0ab4212cd0ef8ea04a Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Tue, 24 Jan 2017 13:19:06 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 26 Jan 2017 11:42:59 -0300
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 <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/scripting-engines/trace-event-perl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tools/perf/util/scripting-engines/trace-event-perl.c +4 -2
@@ -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);