diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-04 18:14:32 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-12 14:20:53 +0300 |
commit | 5f0fef8ac3e7a5707751493293ba8ff2ffc0f8a4 (patch) | |
tree | 5976b7a548550703dcc4b07a6661626a87b74ec3 /tools/perf/util/scripting-engines | |
parent | c1529738f5eb5fe7c472e0374ad7954d52566df9 (diff) | |
download | linux-5f0fef8ac3e7a5707751493293ba8ff2ffc0f8a4.tar.xz |
perf callchain: Use 'struct map_symbol' in 'struct callchain_cursor_node'
To ease passing around map+symbol, just like done for other parts of the
tree recently.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
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-perl.c | 16 | ||||
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index 741f040648b5..0e608a5ef599 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c @@ -294,17 +294,17 @@ static SV *perl_process_callchain(struct perf_sample *sample, goto exit; } - if (node->sym) { + if (node->ms.sym) { HV *sym = newHV(); if (!sym) { hv_undef(elem); goto exit; } - if (!hv_stores(sym, "start", newSVuv(node->sym->start)) || - !hv_stores(sym, "end", newSVuv(node->sym->end)) || - !hv_stores(sym, "binding", newSVuv(node->sym->binding)) || - !hv_stores(sym, "name", newSVpvn(node->sym->name, - node->sym->namelen)) || + if (!hv_stores(sym, "start", newSVuv(node->ms.sym->start)) || + !hv_stores(sym, "end", newSVuv(node->ms.sym->end)) || + !hv_stores(sym, "binding", newSVuv(node->ms.sym->binding)) || + !hv_stores(sym, "name", newSVpvn(node->ms.sym->name, + node->ms.sym->namelen)) || !hv_stores(elem, "sym", newRV_noinc((SV*)sym))) { hv_undef(sym); hv_undef(elem); @@ -312,8 +312,8 @@ static SV *perl_process_callchain(struct perf_sample *sample, } } - if (node->map) { - struct map *map = node->map; + if (node->ms.map) { + struct map *map = node->ms.map; const char *dsoname = "[unknown]"; if (map && map->dso) { if (symbol_conf.show_kernel_path && map->dso->long_name) diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index 9e0582717f5f..9581a904af29 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c @@ -428,24 +428,24 @@ static PyObject *python_process_callchain(struct perf_sample *sample, pydict_set_item_string_decref(pyelem, "ip", PyLong_FromUnsignedLongLong(node->ip)); - if (node->sym) { + if (node->ms.sym) { PyObject *pysym = PyDict_New(); if (!pysym) Py_FatalError("couldn't create Python dictionary"); pydict_set_item_string_decref(pysym, "start", - PyLong_FromUnsignedLongLong(node->sym->start)); + PyLong_FromUnsignedLongLong(node->ms.sym->start)); pydict_set_item_string_decref(pysym, "end", - PyLong_FromUnsignedLongLong(node->sym->end)); + PyLong_FromUnsignedLongLong(node->ms.sym->end)); pydict_set_item_string_decref(pysym, "binding", - _PyLong_FromLong(node->sym->binding)); + _PyLong_FromLong(node->ms.sym->binding)); pydict_set_item_string_decref(pysym, "name", - _PyUnicode_FromStringAndSize(node->sym->name, - node->sym->namelen)); + _PyUnicode_FromStringAndSize(node->ms.sym->name, + node->ms.sym->namelen)); pydict_set_item_string_decref(pyelem, "sym", pysym); } - if (node->map) { - const char *dsoname = get_dsoname(node->map); + if (node->ms.map) { + const char *dsoname = get_dsoname(node->ms.map); pydict_set_item_string_decref(pyelem, "dso", _PyUnicode_FromString(dsoname)); |