diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-04-13 02:57:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-04-13 02:57:50 -0400 |
commit | aeaae7d612ff2ad647ba422099da56eb3aa89237 (patch) | |
tree | bad2e6634e57c9d0d24a67086620ffca86dc5313 /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | 889fac6d67d46a5e781c08fb26fec9016db1c307 (diff) | |
parent | 99e87f7bb7268cf644add87130590966fd5d0d17 (diff) |
Merge tag 'perf-core-for-mingo-20160408' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Beautify more syscall arguments in 'perf trace', using the type column in
tracepoint /format fields to attach, for instance, a pid_t resolver to the
thread COMM, also attach a mode_t beautifier in the same fashion
(Arnaldo Carvalho de Melo)
- Build the syscall table id <-> name resolver using the same .tbl file
used in the kernel to generate headers, to avoid the delay in getting
new syscalls supported in the audit-libs external dependency, done so
far only for x86_64 (Arnaldo Carvalho de Melo)
- Improve the documentation of event specifications (Andi Kleen)
- Process update events in 'perf script', fixing up this use case:
# perf stat -a -I 1000 -e cycles record | perf script -s script.py
- Shared object symbol adjustment fixes, fixing symbol resolution in
Android (Wang Nan)
Infrastructure changes:
- Add dedicated unwind addr_space member into thread struct, to allow
tools to use thread->priv, noticed while working on having callchains
in 'perf trace' (Jiri Olsa)
Build fixes:
- Fix the build in Ubuntu 12.04 (Arnaldo Carvalho de Melo, Vinson Lee)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-perl.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c index 1d160855cda9..35ed00a600fb 100644 --- a/tools/perf/util/scripting-engines/trace-event-perl.c +++ b/tools/perf/util/scripting-engines/trace-event-perl.c | |||
@@ -283,18 +283,27 @@ static SV *perl_process_callchain(struct perf_sample *sample, | |||
283 | if (!elem) | 283 | if (!elem) |
284 | goto exit; | 284 | goto exit; |
285 | 285 | ||
286 | hv_stores(elem, "ip", newSVuv(node->ip)); | 286 | if (!hv_stores(elem, "ip", newSVuv(node->ip))) { |
287 | hv_undef(elem); | ||
288 | goto exit; | ||
289 | } | ||
287 | 290 | ||
288 | if (node->sym) { | 291 | if (node->sym) { |
289 | HV *sym = newHV(); | 292 | HV *sym = newHV(); |
290 | if (!sym) | 293 | if (!sym) { |
294 | hv_undef(elem); | ||
295 | goto exit; | ||
296 | } | ||
297 | if (!hv_stores(sym, "start", newSVuv(node->sym->start)) || | ||
298 | !hv_stores(sym, "end", newSVuv(node->sym->end)) || | ||
299 | !hv_stores(sym, "binding", newSVuv(node->sym->binding)) || | ||
300 | !hv_stores(sym, "name", newSVpvn(node->sym->name, | ||
301 | node->sym->namelen)) || | ||
302 | !hv_stores(elem, "sym", newRV_noinc((SV*)sym))) { | ||
303 | hv_undef(sym); | ||
304 | hv_undef(elem); | ||
291 | goto exit; | 305 | goto exit; |
292 | hv_stores(sym, "start", newSVuv(node->sym->start)); | 306 | } |
293 | hv_stores(sym, "end", newSVuv(node->sym->end)); | ||
294 | hv_stores(sym, "binding", newSVuv(node->sym->binding)); | ||
295 | hv_stores(sym, "name", newSVpvn(node->sym->name, | ||
296 | node->sym->namelen)); | ||
297 | hv_stores(elem, "sym", newRV_noinc((SV*)sym)); | ||
298 | } | 307 | } |
299 | 308 | ||
300 | if (node->map) { | 309 | if (node->map) { |
@@ -306,7 +315,10 @@ static SV *perl_process_callchain(struct perf_sample *sample, | |||
306 | else if (map->dso->name) | 315 | else if (map->dso->name) |
307 | dsoname = map->dso->name; | 316 | dsoname = map->dso->name; |
308 | } | 317 | } |
309 | hv_stores(elem, "dso", newSVpv(dsoname,0)); | 318 | if (!hv_stores(elem, "dso", newSVpv(dsoname,0))) { |
319 | hv_undef(elem); | ||
320 | goto exit; | ||
321 | } | ||
310 | } | 322 | } |
311 | 323 | ||
312 | callchain_cursor_advance(&callchain_cursor); | 324 | callchain_cursor_advance(&callchain_cursor); |