linux/tools/perf
Arnaldo Carvalho de Melo d1d438a3b1 perf trace: Beautify pid_t arguments
When reading the syscall tracepoint /format file, look for arguments
of type "pid_t" and attach the PID beautifier, that will do a lookup
on the threads it knows, i.e. the ones that came from PERF_RECORD_COMM
events and add the COMM after the pid in such args:

Excerpt of a system wide trace for syscalls with pid_t args:

  55602.977 ( 0.006 ms): bash/12122 setpgid(pid: 24347 (bash), pgid: 24347 (bash)) = 0
  55603.024 ( 0.004 ms): bash/24347 setpgid(pid: 24347 (bash), pgid: 24347 (bash)) = 0
  55691.527 (88.397 ms): bash/12122 wait4(upid: -1, stat_addr: 0x7ffe0cee1720, options: UNTRACED|CONTINUED) ...
  55692.479 ( 0.952 ms): git/24347 wait4(upid: 24368, stat_addr: 0x7ffe030d5724) ...
  55694.549 ( 2.070 ms): pre-commit/24368 wait4(upid: -1, stat_addr: 0x7ffc94f4fc10) = 24369 (pre-commit)
  55694.575 ( 0.002 ms): pre-commit/24368 wait4(upid: -1, stat_addr: 0x7ffc94f4f650, options: NOHANG) = -1 ECHILD No child processes
  55695.934 ( 0.010 ms): pre-commit/24368 wait4(upid: -1, stat_addr: 0x7ffc94f4f2d0, options: NOHANG) = 24370 (git)
  55695.937 ( 0.001 ms): pre-commit/24368 wait4(upid: -1, stat_addr: 0x7ffc94f4f2d0, options: NOHANG) = -1 ECHILD No child processes
  55717.963 ( 0.000 ms): pre-commit/24371  ... [continued]: wait4()) = 24372
  55717.978 (21.468 ms): :24371/24371 wait4(upid: -1, stat_addr: 0x7ffc94f4f230) ...
  55718.087 ( 0.109 ms): pre-commit/24371 wait4(upid: -1, stat_addr: 0x7ffc94f4f230) = 24373 (tr)
  55718.187 ( 0.096 ms): pre-commit/24371 wait4(upid: -1, stat_addr: 0x7ffc94f4f230) = 24374 (wc)
  55718.218 ( 0.002 ms): pre-commit/24371 wait4(upid: -1, stat_addr: 0x7ffc94f4eed0, options: NOHANG) = -1 ECHILD No child processes
  55718.367 ( 0.005 ms): pre-commit/24368 wait4(upid: -1, stat_addr: 0x7ffc94f4f1d0, options: NOHANG) = 24371 (pre-commit)
  55718.369 ( 0.001 ms): pre-commit/24368 wait4(upid: -1, stat_addr: 0x7ffc94f4f1d0, options: NOHANG) = -1 ECHILD No child processes
  55741.021 (49.494 ms): git/24347  ... [continued]: wait4()) = 24368 (pre-commit)
  74146.427 (18319.601 ms): git/24347 wait4(upid: 24375 (git), stat_addr: 0x7ffe030d6824) ...
  74149.036 ( 0.891 ms): bash/24391 wait4(upid: -1, stat_addr: 0x7ffe0cee0560) = 24393 (sed)

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-75yl9hzjhb020iadc81gdj8t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-04-06 19:36:30 -03:00
..
arch perf intel-pt/bts: Define JITDUMP_USE_ARCH_TIMESTAMP 2016-04-01 18:46:24 -03:00
bench perf tools: Remove needless 'extern' from function prototypes 2016-03-23 15:06:35 -03:00
config perf tools: Remove superfluous ARCH Makefile includes 2016-04-06 11:00:01 -03:00
Documentation perf list: Document event specifications better 2016-04-06 11:19:18 -03:00
jvmti perf jit: Add support for using TSC as a timestamp 2016-04-01 18:42:55 -03:00
python perf python: Support the PERF_RECORD_SWITCH event 2015-10-07 19:41:50 -03:00
scripts perf python scripting: Append examples to err msg about audit-libs-python 2016-02-12 11:30:27 -03:00
tests perf tests: Add test to check for event times 2016-03-30 11:14:08 -03:00
trace perf trace: Beautify pid_t arguments 2016-04-06 19:36:30 -03:00
ui perf hists: Fix determination of a callchain node's childlessness 2016-03-30 18:08:39 -03:00
util perf script perl: Do error checking on new backtrace routine 2016-04-06 10:44:28 -03:00
.gitignore perf tools: Add Intel PT instruction decoder 2015-08-17 11:11:36 -03:00
Build perf tools: Set and pass DOCDIR to builtin-report.c 2016-01-12 12:42:07 -03:00
builtin-annotate.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-bench.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-buildid-cache.c perf tools: Move timestamp creation to util 2016-01-29 17:30:06 -03:00
builtin-buildid-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-config.c perf config: Add '--system' and '--user' options to select which config file is used 2016-02-12 10:54:46 -03:00
builtin-data.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-diff.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-evlist.c perf evlist: Add --trace-fields option to show trace fields 2016-01-08 14:23:02 -03:00
builtin-help.c perf help: Use asprintf instead of adhoc equivalents 2016-03-23 16:36:07 -03:00
builtin-inject.c perf tools: Add time conversion event 2016-03-31 10:52:24 -03:00
builtin-kmem.c perf config: Bring perf_default_config to the very beginning at main() 2016-02-26 19:49:16 -03:00
builtin-kvm.c perf kvm/powerpc: Port perf kvm stat to powerpc 2016-01-29 17:49:54 -03:00
builtin-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-lock.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-mem.c perf mem: Add -U/-K (--all-user/--all-kernel) options 2016-03-30 11:14:07 -03:00
builtin-probe.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-record.c perf tools: Add time conversion event 2016-03-31 10:52:24 -03:00
builtin-report.c perf tools: Do not include stringify.h from the kernel sources 2016-03-23 15:21:15 -03:00
builtin-sched.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-script.c perf script: Remove lots of unused arguments 2016-03-23 12:11:03 -03:00
builtin-stat.c perf stat: Add --metric-only support for -A 2016-03-10 16:50:47 -03:00
builtin-timechart.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-top.c perf tools: Do not include stringify.h from the kernel sources 2016-03-23 15:21:15 -03:00
builtin-trace.c perf trace: Beautify pid_t arguments 2016-04-06 19:36:30 -03:00
builtin-version.c perf tools: Move cmd_version() to builtin-version.c 2015-12-09 13:42:03 -03:00
builtin.h perf tools: Remove needless 'extern' from function prototypes 2016-03-23 15:06:35 -03:00
command-list.txt perf tools: Do not show trace command if it's not compiled in 2016-01-08 12:46:17 -03:00
CREDITS
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
Makefile perf build tests: Do parallell builds with 'build-test' 2016-02-04 15:57:00 -03:00
Makefile.perf perf tools: Remove superfluous ARCH Makefile includes 2016-04-06 11:00:01 -03:00
MANIFEST perf bench: Fix detached tarball building due to missing 'perf bench memcpy' headers 2016-03-24 12:28:57 -03:00
perf-archive.sh
perf-completion.sh perf tools: Avoid confusion with preloaded bash function for perf bash completion 2015-03-19 13:53:27 -03:00
perf-read-vdso.c perf tools: Build programs to copy 32-bit compatibility 2014-10-29 10:32:48 -02:00
perf-sys.h perf tools: Move generic barriers out of perf-sys.h 2015-05-08 16:05:08 -03:00
perf-with-kcore.sh perf tools: Fix perf-with-kcore handling of arguments containing spaces 2015-08-06 16:48:27 -03:00
perf.c perf config: Remove duplicated set_buildid_dir calls 2016-03-30 11:14:08 -03:00
perf.h perf record: Add --all-user/--all-kernel options 2016-02-18 10:48:44 -03:00