lkml.org 
[lkml]   [2021]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 07/10] perf scripting python: Add cpumode
    Date
    Add cpumode to python scripting.

    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    ---
    tools/perf/util/scripting-engines/trace-event-python.c | 3 +++
    1 file changed, 3 insertions(+)

    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));
    --
    2.17.1
    \
     
     \ /
      Last update: 2021-05-25 11:51    [W:2.502 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site