perf scripting python: Use Py_FatalError instead of die()

It probably is equivalent, but that seems to be the "pythonic" way of
dieing? Anyway, one less die() in the tools/perf codebase.

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>
Cc: Chris Phlipot <cphlipot0@gmail.com>
Link: http://lkml.kernel.org/n/tip-nlzgepdv2818zs4e7faif9tu@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 38f5d8b3
...@@ -408,8 +408,11 @@ static void python_process_tracepoint(struct perf_sample *sample, ...@@ -408,8 +408,11 @@ static void python_process_tracepoint(struct perf_sample *sample,
if (!t) if (!t)
Py_FatalError("couldn't create Python tuple"); Py_FatalError("couldn't create Python tuple");
if (!event) if (!event) {
die("ug! no event found for type %d", (int)evsel->attr.config); snprintf(handler_name, sizeof(handler_name),
"ug! no event found for type %" PRIu64, (u64)evsel->attr.config);
Py_FatalError(handler_name);
}
pid = raw_field_value(event, "common_pid", data); pid = raw_field_value(event, "common_pid", data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment