diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2021-05-25 12:51:09 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-05-25 16:07:17 +0300 |
commit | 22cc2f74bbe2174b54d3041ed41424f7d500026d (patch) | |
tree | 9996b7ae4a705c5b269e588f8d14511deb715eca /tools/perf/util/scripting-engines | |
parent | 142b05182eaa449bacd419d31d0dbbf24e048dbf (diff) | |
download | linux-22cc2f74bbe2174b54d3041ed41424f7d500026d.tar.xz |
perf scripting python: Add cpumode
Add cpumode to python scripting.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20210525095112.1399-8-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/scripting-engines')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index fccd1b415ea0..cb708669e02e 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c @@ -822,6 +822,9 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, brstacksym = python_process_brstacksym(sample, al->thread); pydict_set_item_string_decref(dict, "brstacksym", brstacksym); + pydict_set_item_string_decref(dict_sample, "cpumode", + _PyLong_FromLong((unsigned long)sample->cpumode)); + if (addr_al) { pydict_set_item_string_decref(dict_sample, "addr_correlates_sym", PyBool_FromLong(1)); |