-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'perf-core-for-mingo' 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: . Make some POWER7 events available in sysfs, equivalent to what was done on x86, from Sukadev Bhattiprolu. . Add event group view, from Namyung Kim: To use it, 'perf record' should group events when recording. And then perf report parses the saved group relation from file header and prints them together if --group option is provided. You can use 'perf evlist' command to see event group information: $ perf record -e '{ref-cycles,cycles}' noploop 1 [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ] $ perf evlist --group {ref-cycles,cycles} With this example, default perf report will show you each event separately like this: $ perf report ... # group: {ref-cycles,cycles} # ======== # Samples: 3K of event 'ref-cycles' # Event count (approx.): 3153797218 # # Overhead Command Shared Object Symbol # ........ ....... ................. .......................... 99.84% noploop noploop [.] main 0.07% noploop ld-2.15.so [.] strcmp 0.03% noploop [kernel.kallsyms] [k] timerqueue_del 0.03% noploop [kernel.kallsyms] [k] sched_clock_cpu 0.02% noploop [kernel.kallsyms] [k] account_user_time 0.01% noploop [kernel.kallsyms] [k] __alloc_pages_nodemask 0.00% noploop [kernel.kallsyms] [k] native_write_msr_safe # Samples: 3K of event 'cycles' # Event count (approx.): 3722310525 # # Overhead Command Shared Object Symbol # ........ ....... ................. ......................... 99.76% noploop noploop [.] main 0.11% noploop [kernel.kallsyms] [k] _raw_spin_lock 0.06% noploop [kernel.kallsyms] [k] find_get_page 0.03% noploop [kernel.kallsyms] [k] sched_clock_cpu 0.02% noploop [kernel.kallsyms] [k] rcu_check_callbacks 0.02% noploop [kernel.kallsyms] [k] __current_kernel_time 0.00% noploop [kernel.kallsyms] [k] native_write_msr_safe In this case the event group information will be shown in the end of header area. So you can use --group option to enable event group view. $ perf report --group ... # group: {ref-cycles,cycles} # ======== # Samples: 7K of event 'anon group { ref-cycles, cycles }' # Event count (approx.): 6876107743 # # Overhead Command Shared Object Symbol # ................ ....... ................. .......................... 99.84% 99.76% noploop noploop [.] main 0.07% 0.00% noploop ld-2.15.so [.] strcmp 0.03% 0.00% noploop [kernel.kallsyms] [k] timerqueue_del 0.03% 0.03% noploop [kernel.kallsyms] [k] sched_clock_cpu 0.02% 0.00% noploop [kernel.kallsyms] [k] account_user_time 0.01% 0.00% noploop [kernel.kallsyms] [k] __alloc_pages_nodemask 0.00% 0.00% noploop [kernel.kallsyms] [k] native_write_msr_safe 0.00% 0.11% noploop [kernel.kallsyms] [k] _raw_spin_lock 0.00% 0.06% noploop [kernel.kallsyms] [k] find_get_page 0.00% 0.02% noploop [kernel.kallsyms] [k] rcu_check_callbacks 0.00% 0.02% noploop [kernel.kallsyms] [k] __current_kernel_time As you can see the Overhead column now contains both of ref-cycles and cycles and header line shows group information also - 'anon group { ref-cycles, cycles }'. The output is sorted by period of group leader first. If perf.data file doesn't contain group information, this --group option does nothing. So if you want enable event group view by default you can set it in ~/.perfconfig file: $ cat ~/.perfconfig [report] group = true It can be overridden with command line if you want: $ perf report --no-group Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
- Loading branch information
Showing
28 changed files
with
1,059 additions
and
267 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
Documentation/ABI/testing/sysfs-bus-event_source-devices-events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
What: /sys/devices/cpu/events/ | ||
/sys/devices/cpu/events/branch-misses | ||
/sys/devices/cpu/events/cache-references | ||
/sys/devices/cpu/events/cache-misses | ||
/sys/devices/cpu/events/stalled-cycles-frontend | ||
/sys/devices/cpu/events/branch-instructions | ||
/sys/devices/cpu/events/stalled-cycles-backend | ||
/sys/devices/cpu/events/instructions | ||
/sys/devices/cpu/events/cpu-cycles | ||
|
||
Date: 2013/01/08 | ||
|
||
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> | ||
|
||
Description: Generic performance monitoring events | ||
|
||
A collection of performance monitoring events that may be | ||
supported by many/most CPUs. These events can be monitored | ||
using the 'perf(1)' tool. | ||
|
||
The contents of each file would look like: | ||
|
||
event=0xNNNN | ||
|
||
where 'N' is a hex digit and the number '0xNNNN' shows the | ||
"raw code" for the perf event identified by the file's | ||
"basename". | ||
|
||
|
||
What: /sys/devices/cpu/events/PM_LD_MISS_L1 | ||
/sys/devices/cpu/events/PM_LD_REF_L1 | ||
/sys/devices/cpu/events/PM_CYC | ||
/sys/devices/cpu/events/PM_BRU_FIN | ||
/sys/devices/cpu/events/PM_GCT_NOSLOT_CYC | ||
/sys/devices/cpu/events/PM_BRU_MPRED | ||
/sys/devices/cpu/events/PM_INST_CMPL | ||
/sys/devices/cpu/events/PM_CMPLU_STALL | ||
|
||
Date: 2013/01/08 | ||
|
||
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> | ||
Linux Powerpc mailing list <linuxppc-dev@ozlabs.org> | ||
|
||
Description: POWER-systems specific performance monitoring events | ||
|
||
A collection of performance monitoring events that may be | ||
supported by the POWER CPU. These events can be monitored | ||
using the 'perf(1)' tool. | ||
|
||
These events may not be supported by other CPUs. | ||
|
||
The contents of each file would look like: | ||
|
||
event=0xNNNN | ||
|
||
where 'N' is a hex digit and the number '0xNNNN' shows the | ||
"raw code" for the perf event identified by the file's | ||
"basename". | ||
|
||
Further, multiple terms like 'event=0xNNNN' can be specified | ||
and separated with comma. All available terms are defined in | ||
the /sys/bus/event_source/devices/<dev>/format file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.