perf scripting python: Use Py_FatalError instead of die()
[deliverable/linux.git] / tools / perf / util / scripting-engines / trace-event-python.c
index 091bce67844cb9c4dc7e051994ea0222f1c62722..73ee12d96c33ff77599638aee59131b0cdd9b61d 100644 (file)
@@ -408,8 +408,11 @@ static void python_process_tracepoint(struct perf_sample *sample,
        if (!t)
                Py_FatalError("couldn't create Python tuple");
 
-       if (!event)
-               die("ug! no event found for type %d", (int)evsel->attr.config);
+       if (!event) {
+               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);
 
@@ -1062,7 +1065,7 @@ static void set_table_handlers(struct tables *tables)
                        tables->dbe.cpr = call_path_root__new();
 
                if (!tables->dbe.cpr)
-                       Py_FatalError("failed to create calls processor");
+                       Py_FatalError("failed to create call path root");
        }
 
        tables->db_export_mode = true;
This page took 0.038685 seconds and 5 git commands to generate.