forked from Minki/linux
fbe96f29ce
The goal of this patch is to include more information about the host environment into the perf.data so it is more self-descriptive. Overtime, profiles are captured on various machines and it becomes hard to track what was recorded, on what machine and when. This patch provides a way to solve this by extending the perf.data file with basic information about the host machine. To add those extensions, we leverage the feature bits capabilities of the perf.data format. The change is backward compatible with existing perf.data files. We define the following useful new extensions: - HEADER_HOSTNAME: the hostname - HEADER_OSRELEASE: the kernel release number - HEADER_ARCH: the hw architecture - HEADER_CPUDESC: generic CPU description - HEADER_NRCPUS: number of online/avail cpus - HEADER_CMDLINE: perf command line - HEADER_VERSION: perf version - HEADER_TOPOLOGY: cpu topology - HEADER_EVENT_DESC: full event description (attrs) - HEADER_CPUID: easy-to-parse low level CPU identication The small granularity for the entries is to make it easier to extend without breaking backward compatiblity. Many entries are provided as ASCII strings. Perf report/script have been modified to print the basic information as easy-to-parse ASCII strings. Extended information about CPU and NUMA topology may be requested with the -I option. Thanks to David Ahern for reviewing and testing the many versions of this patch. $ perf report --stdio # ======== # captured on : Mon Sep 26 15:22:14 2011 # hostname : quad # os release : 3.1.0-rc4-tip # perf version : 3.1.0-rc4 # arch : x86_64 # nrcpus online : 4 # nrcpus avail : 4 # cpudesc : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz # cpuid : GenuineIntel,6,15,11 # total memory :8105360
kB # cmdline : /home/eranian/perfmon/official/tip/build/tools/perf/perf record date # event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, id = { 29, 30, 31, # HEADER_CPU_TOPOLOGY info available, use -I to display # HEADER_NUMA_TOPOLOGY info available, use -I to display # ======== # ... $ perf report --stdio -I # ======== # captured on : Mon Sep 26 15:22:14 2011 # hostname : quad # os release : 3.1.0-rc4-tip # perf version : 3.1.0-rc4 # arch : x86_64 # nrcpus online : 4 # nrcpus avail : 4 # cpudesc : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz # cpuid : GenuineIntel,6,15,11 # total memory :8105360
kB # cmdline : /home/eranian/perfmon/official/tip/build/tools/perf/perf record date # event : name = cycles, type = 0, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, id = { 29, 30, 31, # sibling cores : 0-3 # sibling threads : 0 # sibling threads : 1 # sibling threads : 2 # sibling threads : 3 # node0 meminfo : total = 8320608 kB, free = 7571024 kB # node0 cpu list : 0-3 # ======== # ... Reviewed-by: David Ahern <dsahern@gmail.com> Tested-by: David Ahern <dsahern@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Robert Richter <robert.richter@amd.com> Cc: Andi Kleen <ak@linux.intel.com> Link: http://lkml.kernel.org/r/20110930134040.GA5575@quad Signed-off-by: Stephane Eranian <eranian@google.com> [ committer notes: Use --show-info in the tools as was in the docs, rename perf_header_fprintf_info to perf_file_section__fprintf_info, fixup conflict withf69b64f7
"perf: Support setting the disassembler style" ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
151 lines
3.5 KiB
Plaintext
151 lines
3.5 KiB
Plaintext
perf-report(1)
|
|
==============
|
|
|
|
NAME
|
|
----
|
|
perf-report - Read perf.data (created by perf record) and display the profile
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[verse]
|
|
'perf report' [-i <file> | --input=file]
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
This command displays the performance counter profile information recorded
|
|
via perf record.
|
|
|
|
OPTIONS
|
|
-------
|
|
-i::
|
|
--input=::
|
|
Input file name. (default: perf.data)
|
|
|
|
-v::
|
|
--verbose::
|
|
Be more verbose. (show symbol address, etc)
|
|
|
|
-d::
|
|
--dsos=::
|
|
Only consider symbols in these dsos. CSV that understands
|
|
file://filename entries.
|
|
-n::
|
|
--show-nr-samples::
|
|
Show the number of samples for each symbol
|
|
|
|
--showcpuutilization::
|
|
Show sample percentage for different cpu modes.
|
|
|
|
-T::
|
|
--threads::
|
|
Show per-thread event counters
|
|
-C::
|
|
--comms=::
|
|
Only consider symbols in these comms. CSV that understands
|
|
file://filename entries.
|
|
-S::
|
|
--symbols=::
|
|
Only consider these symbols. CSV that understands
|
|
file://filename entries.
|
|
|
|
-U::
|
|
--hide-unresolved::
|
|
Only display entries resolved to a symbol.
|
|
|
|
-s::
|
|
--sort=::
|
|
Sort by key(s): pid, comm, dso, symbol, parent.
|
|
|
|
-p::
|
|
--parent=<regex>::
|
|
regex filter to identify parent, see: '--sort parent'
|
|
|
|
-x::
|
|
--exclude-other::
|
|
Only display entries with parent-match.
|
|
|
|
-w::
|
|
--column-widths=<width[,width...]>::
|
|
Force each column width to the provided list, for large terminal
|
|
readability.
|
|
|
|
-t::
|
|
--field-separator=::
|
|
|
|
Use a special separator character and don't pad with spaces, replacing
|
|
all occurrences of this separator in symbol names (and other output)
|
|
with a '.' character, that thus it's the only non valid separator.
|
|
|
|
-D::
|
|
--dump-raw-trace::
|
|
Dump raw trace in ASCII.
|
|
|
|
-g [type,min,order]::
|
|
--call-graph::
|
|
Display call chains using type, min percent threshold and order.
|
|
type can be either:
|
|
- flat: single column, linear exposure of call chains.
|
|
- graph: use a graph tree, displaying absolute overhead rates.
|
|
- fractal: like graph, but displays relative rates. Each branch of
|
|
the tree is considered as a new profiled object. +
|
|
|
|
order can be either:
|
|
- callee: callee based call graph.
|
|
- caller: inverted caller based call graph.
|
|
|
|
Default: fractal,0.5,callee.
|
|
|
|
-G::
|
|
--inverted::
|
|
alias for inverted caller based call graph.
|
|
|
|
--pretty=<key>::
|
|
Pretty printing style. key: normal, raw
|
|
|
|
--stdio:: Use the stdio interface.
|
|
|
|
--tui:: Use the TUI interface, that is integrated with annotate and allows
|
|
zooming into DSOs or threads, among other features. Use of --tui
|
|
requires a tty, if one is not present, as when piping to other
|
|
commands, the stdio interface is used.
|
|
|
|
-k::
|
|
--vmlinux=<file>::
|
|
vmlinux pathname
|
|
|
|
--kallsyms=<file>::
|
|
kallsyms pathname
|
|
|
|
-m::
|
|
--modules::
|
|
Load module symbols. WARNING: This should only be used with -k and
|
|
a LIVE kernel.
|
|
|
|
-f::
|
|
--force::
|
|
Don't complain, do it.
|
|
|
|
--symfs=<directory>::
|
|
Look for files with symbols relative to this directory.
|
|
|
|
-c::
|
|
--cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
|
|
be provided as a comma-separated list with no space: 0,1. Ranges of
|
|
CPUs are specified with -: 0-2. Default is to report samples on all
|
|
CPUs.
|
|
|
|
-M::
|
|
--disassembler-style=:: Set disassembler style for objdump.
|
|
|
|
--show-total-period:: Show a column with the sum of periods.
|
|
|
|
-I::
|
|
--show-info::
|
|
Display extended information about the perf.data file. This adds
|
|
information which may be very large and thus may clutter the display.
|
|
It currently includes: cpu and numa topology of the host system.
|
|
|
|
SEE ALSO
|
|
--------
|
|
linkperf:perf-stat[1]
|