diff options
| author | Masami Hiramatsu <[email protected]> | 2021-11-22 09:30:48 +0000 |
|---|---|---|
| committer | Steven Rostedt (VMware) <[email protected]> | 2021-12-06 20:37:22 +0000 |
| commit | 7c689c839734a23eda855e69a56ed4795533bf71 (patch) | |
| tree | f669b7efa19178bc6e753cbf74efb8855f2def35 /tools/perf/util/python.c | |
| parent | libtraceevent: Add __rel_loc relative location attribute support (diff) | |
| download | kernel-7c689c839734a23eda855e69a56ed4795533bf71.tar.gz kernel-7c689c839734a23eda855e69a56ed4795533bf71.zip | |
tools/perf: Add '__rel_loc' event field parsing support
Add new '__rel_loc' dynamic data location attribute support.
This type attribute is similar to the '__data_loc' but records the
offset from the field itself.
The libtraceevent adds TEP_FIELD_IS_RELATIVE to the
'tep_format_field::flags' with TEP_FIELD_IS_DYNAMIC for'__rel_loc'.
Link: https://lkml.kernel.org/r/163757344810.510314.12449413842136229871.stgit@devnote2
Cc: Beau Belgrave <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Tom Zanussi <[email protected]>
Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'tools/perf/util/python.c')
| -rw-r--r-- | tools/perf/util/python.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 563a9ba8954f..3e7538db9107 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -428,6 +428,8 @@ tracepoint_field(struct pyrf_event *pe, struct tep_format_field *field) 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)) { |
