]> Git Repo - linux.git/blobdiff - tools/perf/util/scripting-engines/trace-event-python.c
scsi: zfcp: Trace when request remove fails after qdio send fails
[linux.git] / tools / perf / util / scripting-engines / trace-event-python.c
index 1985d1a42a224b90cd31884ed5e7072a41429dad..e930f5f1f36d2831860d142143e4fc802bc3e46d 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/bitmap.h>
 #include <linux/compiler.h>
 #include <linux/time64.h>
+#include <traceevent/event-parse.h>
 
 #include "../build-id.h"
 #include "../counts.h"
@@ -934,7 +935,7 @@ static void python_process_tracepoint(struct perf_sample *sample,
 
        sprintf(handler_name, "%s__%s", event->system, event->name);
 
-       if (!test_and_set_bit(event->id, events_defined))
+       if (!__test_and_set_bit(event->id, events_defined))
                define_event_symbols(event, handler_name, event->print_fmt.args);
 
        handler = get_handler(handler_name);
@@ -993,8 +994,10 @@ static void python_process_tracepoint(struct perf_sample *sample,
                                offset  = val;
                                len     = offset >> 16;
                                offset &= 0xffff;
+#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
                                if (field->flags & TEP_FIELD_IS_RELATIVE)
                                        offset += field->offset + field->size;
+#endif
                        }
                        if (field->flags & TEP_FIELD_IS_STRING &&
                            is_printable_array(data + offset, len)) {
@@ -1654,7 +1657,7 @@ static void python_process_stat(struct perf_stat_config *config,
        struct perf_cpu_map *cpus = counter->core.cpus;
        int cpu, thread;
 
-       for (thread = 0; thread < threads->nr; thread++) {
+       for (thread = 0; thread < perf_thread_map__nr(threads); thread++) {
                for (cpu = 0; cpu < perf_cpu_map__nr(cpus); cpu++) {
                        process_stat(counter, perf_cpu_map__cpu(cpus, cpu),
                                     perf_thread_map__pid(threads, thread), tstamp,
This page took 0.034297 seconds and 4 git commands to generate.