提交 22cc2f74 编写于 作者: A Adrian Hunter 提交者: Arnaldo Carvalho de Melo

perf scripting python: Add cpumode

Add cpumode to python scripting.
Signed-off-by: NAdrian 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 142b0518
...@@ -822,6 +822,9 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, ...@@ -822,6 +822,9 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample,
brstacksym = python_process_brstacksym(sample, al->thread); brstacksym = python_process_brstacksym(sample, al->thread);
pydict_set_item_string_decref(dict, "brstacksym", brstacksym); 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) { if (addr_al) {
pydict_set_item_string_decref(dict_sample, "addr_correlates_sym", pydict_set_item_string_decref(dict_sample, "addr_correlates_sym",
PyBool_FromLong(1)); PyBool_FromLong(1));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册