perf tools: Add __data_loc support
[pandora-kernel.git] / tools / perf / util / trace-event-parse.c
index c5c32be..c4b3cb8 100644 (file)
@@ -1925,6 +1925,15 @@ void *raw_field_ptr(struct event *event, const char *name, void *data)
        if (!field)
                return NULL;
 
+       if (field->flags & FIELD_IS_STRING) {
+               int offset;
+
+               offset = *(int *)(data + field->offset);
+               offset &= 0xffff;
+
+               return data + offset;
+       }
+
        return data + field->offset;
 }