Skip to content

Commit 943f32a

Browse files
Leo Yanacmel
authored andcommitted
perf script python: Add addr into perf sample dict
ARM CoreSight auxtrace uses 'sample->addr' to record the target address for branch instructions, so the data of 'sample->addr' is required for tracing data analysis. This commit collects data of 'sample->addr' into perf sample dict, finally can be used for python script for parsing event. Signed-off-by: Leo Yan <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Robert Walker <[email protected]> Cc: Tor Jeremiassen <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 0c71113 commit 943f32a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/perf/util/scripting-engines/trace-event-python.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample,
531531
PyLong_FromUnsignedLongLong(sample->period));
532532
pydict_set_item_string_decref(dict_sample, "phys_addr",
533533
PyLong_FromUnsignedLongLong(sample->phys_addr));
534+
pydict_set_item_string_decref(dict_sample, "addr",
535+
PyLong_FromUnsignedLongLong(sample->addr));
534536
set_sample_read_in_dict(dict_sample, sample, evsel);
535537
pydict_set_item_string_decref(dict, "sample", dict_sample);
536538

0 commit comments

Comments
 (0)