Merge tag 'perf-tools-for-v5.17-2022-01-16' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-microblaze.git] / tools / perf / util / scripting-engines / trace-event-python.c
index bd95d60..f5ad0e6 100644 (file)
@@ -944,6 +944,8 @@ static void python_process_tracepoint(struct perf_sample *sample,
                                offset  = val;
                                len     = offset >> 16;
                                offset &= 0xffff;
+                               if (field->flags & TEP_FIELD_IS_RELATIVE)
+                                       offset += field->offset + field->size;
                        }
                        if (field->flags & TEP_FIELD_IS_STRING &&
                            is_printable_array(data + offset, len)) {