Skip to contentSkip to conversation

perf script: Print comm, fork and exit events also

PATCH In review Namhyung Kim 3 participants 6 messages Nov 26, 2013 – Dec 2, 2013 perf events

lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH v3 1/2 perf script: Print comm, fork and exit events also

If --show-task-events option is given, also print internal COMM, FORK and EXIT events. It would be helpful for debugging.

  $ perf script --show-task-events
  ...
         swapper     0 [009] 3350640.335261: sched:sched_switch: prev_comm=swapper/9
           sleep  9486 [009] 3350640.335509: PERF_RECORD_COMM: sleep:9486
           sleep  9486 [009] 3350640.335806: sched:sched_stat_runtime: comm=sleep pid=9486
         firefox  2635 [003] 3350641.275896: PERF_RECORD_FORK(2635:9487):(2635:2635)
         firefox  2635 [003] 3350641.275896: sched:sched_process_fork: comm=firefox pid=2635
           sleep  9486 [009] 3350641.336009: PERF_RECORD_EXIT(9486:9486):(9486:9486)
---
 tools/perf/Documentation/perf-script.txt |   3 +
 tools/perf/builtin-script.c              | 105 +++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)
tools/perf/Documentation/perf-script.txt +3 -0
index e9cbfcddfa3f..67af9b77ea78 100644
@@ -203,6 +203,9 @@ OPTIONS
 --show-kernel-path::
 	Try to resolve the path of [kernel.kallsyms]
 
+--show-task-events
+	Display task related events (e.g. FORK, COMM, EXIT).
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-script-perl[1],
tools/perf/builtin-script.c +105 -0

129 lines not on this page · raw message

Signature · 1 line
1.7.11.7
author maintainer
#1 lore raw

PATCH v3 2/2 perf script: Print mmap[2] events also

If --show-mmap-events option is given, also print internal MMAP and MMAP2 events. It would be helpful for debugging.

  $ perf script --show-mmap-events
  ...
           sleep  9486 [009] 3350640.335531: PERF_RECORD_MMAP 9486/9486: [0x400000(0x6000) @ 0]: x /usr/bin/sleep
           sleep  9486 [009] 3350640.335542: PERF_RECORD_MMAP 9486/9486: [0x3153a00000(0x223000) @ 0]: x /usr/lib64/ld-2.17.so
           sleep  9486 [009] 3350640.335553: PERF_RECORD_MMAP 9486/9486: [0x7fff8b5fe000(0x2000) @ 0x7fff8b5fe000]: x [vdso]
           sleep  9486 [009] 3350640.335643: PERF_RECORD_MMAP 9486/9486: [0x3153e00000(0x3c0000) @ 0]: x /usr/lib64/libc-2.17.so
---
 tools/perf/Documentation/perf-script.txt |  3 ++
 tools/perf/builtin-script.c              | 69 ++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)
tools/perf/Documentation/perf-script.txt +3 -0
index 67af9b77ea78..cfdbb1e045b5 100644
@@ -206,6 +206,9 @@ OPTIONS
 --show-task-events
 	Display task related events (e.g. FORK, COMM, EXIT).
 
+--show-mmap-events
+	Display mmap related events (e.g. MMAP, MMAP2).
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-script-perl[1],
tools/perf/builtin-script.c +69 -0

93 lines not on this page · raw message

Signature · 1 line
1.7.11.7
author maintainer
#2 lore raw

PATCH 2/2 perf script: Print mmap[2] events also

If --show-mmap-events option is given, also print internal MMAP and MMAP2 events. It would be helpful for debugging.

  $ perf script --show-mmap-events
  ...
           sleep  9486 [009] 3350640.335531: PERF_RECORD_MMAP 9486/9486: [0x400000(0x6000) @ 0]: x /usr/bin/sleep
           sleep  9486 [009] 3350640.335542: PERF_RECORD_MMAP 9486/9486: [0x3153a00000(0x223000) @ 0]: x /usr/lib64/ld-2.17.so
           sleep  9486 [009] 3350640.335553: PERF_RECORD_MMAP 9486/9486: [0x7fff8b5fe000(0x2000) @ 0x7fff8b5fe000]: x [vdso]
           sleep  9486 [009] 3350640.335643: PERF_RECORD_MMAP 9486/9486: [0x3153e00000(0x3c0000) @ 0]: x /usr/lib64/libc-2.17.so

---
Fix event->comm.[tp]id --> event->mmap.[tp]id

 tools/perf/Documentation/perf-script.txt |  3 ++
 tools/perf/builtin-script.c              | 69 ++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)
tools/perf/Documentation/perf-script.txt +3 -0
index 67af9b77ea78..cfdbb1e045b5 100644
@@ -206,6 +206,9 @@ OPTIONS
 --show-task-events
 	Display task related events (e.g. FORK, COMM, EXIT).
 
+--show-mmap-events
+	Display mmap related events (e.g. MMAP, MMAP2).
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-script-perl[1],
tools/perf/builtin-script.c +69 -0

93 lines not on this page · raw message

Signature · 1 line
1.7.11.7
#3 lore raw

[tip:perf/core] perf script: Print mmap[2] events also

perf script: Print mmap[2] events also
Commit-ID:  ba1ddf42f3c3af111d3adee277534f73c1ef6a9b
Gitweb:     http://git.kernel.org/tip/ba1ddf42f3c3af111d3adee277534f73c1ef6a9b
Author:     Namhyung Kim <[email protected]>
AuthorDate: Tue, 26 Nov 2013 17:54:26 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 27 Nov 2013 14:58:38 -0300

perf script: Print mmap[2] events also

If --show-mmap-events option is given, also print internal MMAP and MMAP2 events. It would be helpful for debugging.

  $ perf script --show-mmap-events
  ...
           sleep  9486 [009] 3350640.335531: PERF_RECORD_MMAP 9486/9486: [0x400000(0x6000) @ 0]: x /usr/bin/sleep
           sleep  9486 [009] 3350640.335542: PERF_RECORD_MMAP 9486/9486: [0x3153a00000(0x223000) @ 0]: x /usr/lib64/ld-2.17.so
           sleep  9486 [009] 3350640.335553: PERF_RECORD_MMAP 9486/9486: [0x7fff8b5fe000(0x2000) @ 0x7fff8b5fe000]: x [vdso]
           sleep  9486 [009] 3350640.335643: PERF_RECORD_MMAP 9486/9486: [0x3153e00000(0x3c0000) @ 0]: x /usr/lib64/libc-2.17.so
---
 tools/perf/Documentation/perf-script.txt |  3 ++
 tools/perf/builtin-script.c              | 69 ++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)
tools/perf/Documentation/perf-script.txt +3 -0
index 67af9b7..cfdbb1e 100644
@@ -206,6 +206,9 @@ OPTIONS
 --show-task-events
 	Display task related events (e.g. FORK, COMM, EXIT).
 
+--show-mmap-events
+	Display mmap related events (e.g. MMAP, MMAP2).
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-script-perl[1],
tools/perf/builtin-script.c +69 -0

93 lines not on this page · raw message

#4 lore raw
In reply to Namhyung Kim
perf script: Print comm, fork and exit events also
Commit-ID:  ad7ebb9a48f59bad2714b64725653a73d78b686e
Gitweb:     http://git.kernel.org/tip/ad7ebb9a48f59bad2714b64725653a73d78b686e
Author:     Namhyung Kim <[email protected]>
AuthorDate: Tue, 26 Nov 2013 17:51:12 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 27 Nov 2013 14:58:38 -0300

perf script: Print comm, fork and exit events also

If --show-task-events option is given, also print internal COMM, FORK and EXIT events. It would be helpful for debugging.

  $ perf script --show-task-events
  ...
         swapper     0 [009] 3350640.335261: sched:sched_switch: prev_comm=swapper/9
           sleep  9486 [009] 3350640.335509: PERF_RECORD_COMM: sleep:9486
           sleep  9486 [009] 3350640.335806: sched:sched_stat_runtime: comm=sleep pid=9486
         firefox  2635 [003] 3350641.275896: PERF_RECORD_FORK(2635:9487):(2635:2635)
         firefox  2635 [003] 3350641.275896: sched:sched_process_fork: comm=firefox pid=2635
           sleep  9486 [009] 3350641.336009: PERF_RECORD_EXIT(9486:9486):(9486:9486)
---
 tools/perf/Documentation/perf-script.txt |   3 +
 tools/perf/builtin-script.c              | 105 +++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)
tools/perf/Documentation/perf-script.txt +3 -0
index e9cbfcd..67af9b7 100644
@@ -203,6 +203,9 @@ OPTIONS
 --show-kernel-path::
 	Try to resolve the path of [kernel.kallsyms]
 
+--show-task-events
+	Display task related events (e.g. FORK, COMM, EXIT).
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-script-perl[1],
tools/perf/builtin-script.c +105 -0

129 lines not on this page · raw message

#5 lore raw
Quoted 21 lines · tip-bot for Namhyung Kim
Commit-ID:  ad7ebb9a48f59bad2714b64725653a73d78b686e
Gitweb:     http://git.kernel.org/tip/ad7ebb9a48f59bad2714b64725653a73d78b686e
Author:     Namhyung Kim <[email protected]>
AuthorDate: Tue, 26 Nov 2013 17:51:12 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 27 Nov 2013 14:58:38 -0300

perf script: Print comm, fork and exit events also

If --show-task-events option is given, also print internal COMM, FORK and EXIT events. It would be helpful for debugging.

  $ perf script --show-task-events
  ...
         swapper     0 [009] 3350640.335261: sched:sched_switch: prev_comm=swapper/9
           sleep  9486 [009] 3350640.335509: PERF_RECORD_COMM: sleep:9486
           sleep  9486 [009] 3350640.335806: sched:sched_stat_runtime: comm=sleep pid=9486
         firefox  2635 [003] 3350641.275896: PERF_RECORD_FORK(2635:9487):(2635:2635)
         firefox  2635 [003] 3350641.275896: sched:sched_process_fork: comm=firefox pid=2635
           sleep  9486 [009] 3350641.336009: PERF_RECORD_EXIT(9486:9486):(9486:9486)
Quoted 2 lines

Thanks a lot for doing this Namhyung!