]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/util/scripting-engines/trace-event-perl.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / tools / perf / util / scripting-engines / trace-event-perl.c
index 5d1eb1ccd96c3e0cf73449c97aaee9246d1f9619..c1555fd0035a0f01632312be2488710afe6b7556 100644 (file)
@@ -25,6 +25,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <linux/bitmap.h>
+#include <linux/time64.h>
 
 #include "../util.h"
 #include <EXTERN.h>
@@ -308,10 +309,10 @@ static SV *perl_process_callchain(struct perf_sample *sample,
                if (node->map) {
                        struct map *map = node->map;
                        const char *dsoname = "[unknown]";
-                       if (map && map->dso && (map->dso->name || map->dso->long_name)) {
+                       if (map && map->dso) {
                                if (symbol_conf.show_kernel_path && map->dso->long_name)
                                        dsoname = map->dso->long_name;
-                               else if (map->dso->name)
+                               else
                                        dsoname = map->dso->name;
                        }
                        if (!hv_stores(elem, "dso", newSVpv(dsoname,0))) {
@@ -349,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);
 
@@ -359,8 +362,8 @@ static void perl_process_tracepoint(struct perf_sample *sample,
        if (!test_and_set_bit(event->id, events_defined))
                define_event_symbols(event, handler, event->print_fmt.args);
 
-       s = nsecs / NSECS_PER_SEC;
-       ns = nsecs - s * NSECS_PER_SEC;
+       s = nsecs / NSEC_PER_SEC;
+       ns = nsecs - s * NSEC_PER_SEC;
 
        scripting_context->event_data = data;
        scripting_context->pevent = evsel->tp_format->pevent;