From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 15/16] perf docs: Add perf-sysinfo man page
Date: Fri, 13 Nov 2026 11:56:00 -0800 [thread overview]
Message-ID: <20261113195601.2872738-16-irogers@google.com> (raw)
In-Reply-To: <20261113195601.2872738-1-irogers@google.com>
Document the 'perf sysinfo' subcommand and its options in
Documentation/perf-sysinfo.txt and link it from Documentation/perf.txt.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/Documentation/perf-sysinfo.txt | 113 ++++++++++++++++++++++
tools/perf/Documentation/perf.txt | 2 +-
2 files changed, 114 insertions(+), 1 deletion(-)
create mode 100644 tools/perf/Documentation/perf-sysinfo.txt
diff --git a/tools/perf/Documentation/perf-sysinfo.txt b/tools/perf/Documentation/perf-sysinfo.txt
new file mode 100644
index 000000000000..c72ac6d51551
--- /dev/null
+++ b/tools/perf/Documentation/perf-sysinfo.txt
@@ -0,0 +1,113 @@
+perf-sysinfo(1)
+===============
+
+NAME
+----
+perf-sysinfo - Display and probe PMU and system performance monitoring information
+
+SYNOPSIS
+--------
+[verse]
+'perf sysinfo' [<options>] [pmu_glob ...]
+
+DESCRIPTION
+-----------
+This command displays a summary of the performance monitoring capabilities of
+the current system or a perf.data file, including core PMU features (precise
+sampling, branch stack sampling, user-space counter reading, memory profiling,
+and hardware AUX trace PMUs), memory and PCIe/IO interconnect bus bandwidth
+monitoring support, total events and metrics, pipeline metric drill-down levels
+discovered via '<metric>_group' hierarchies, and an overall system rating.
+
+When '-p'/'--pmus' is specified (or when PMU filter globs, '-v'/'--verbose',
+'-a'/'--all', or '-j'/'--json' are given), it also displays detailed
+information for each PMU, including its perf_event_attr type, kind (core,
+uncore, software, auxtrace, tool, hwmon, drm), CPUs/cpumask, capabilities,
+sysfs format bitfields, event counts, and memory profiling events.
+
+When run on a live system (without '-i'/'--input' and with probing enabled),
+it also actively probes the kernel via 'perf_event_open' to determine:
+- Supported modes (counting, interrupt-based sampling, branch_stack sampling)
+- Supported precise sampling levels, skid semantics, and empirically measured
+ branch instruction skid (minimum, maximum, average instructions from the
+ branch and 'PERF_RECORD_MISC_EXACT_IP' ratio) at each supported precision
+ level:
+ 0 ('SAMPLE_IP' can have arbitrary skid), ':p' / 1 ('SAMPLE_IP' must have
+ constant skid), ':pp' / 2 ('SAMPLE_IP' requested to have 0 skid), and
+ ':ppp' / 3 ('SAMPLE_IP' must have 0 skid, or uses randomization to avoid
+ sample shadowing effects)
+- Supported 'perf_event_sample_format' sample types ('ip', 'tid', 'time',
+ 'addr', 'read', 'callchain', 'id', 'cpu', 'period', 'stream_id', 'raw',
+ 'branch_stack', 'regs_user', 'stack_user', 'weight', 'data_src',
+ 'identifier', 'transaction', 'regs_intr', 'phys_addr', 'aux', 'cgroup',
+ 'data_page_size', 'code_page_size', 'weight_struct')
+- Supported user and interrupt registers for 'PERF_SAMPLE_REGS_USER' and
+ 'PERF_SAMPLE_REGS_INTR', listing separately the interrupt registers that
+ can only be sampled with precise sampling (e.g. x86 XMM registers captured
+ by PEBS)
+- Supported memory profiling events ('ldlat-loads', 'ldlat-stores', 'mem-ldst')
+ and their supported memory sample types ('data_src', 'addr', 'weight', etc.)
+- Supported privilege/exclusion modifiers ('exclude_user', 'exclude_kernel',
+ 'exclude_hv', 'exclude_idle', 'exclude_host', 'exclude_guest')
+- Supported execution features ('leader_sampling', 'sw_grouping', 'inherit',
+ 'sample_freq', 'write_backward', 'callchain', 'data_src', 'weight',
+ 'pinned', 'exclusive', 'format_lost', 'auto_counter_reload',
+ 'aux_start_paused', 'aux_pause', 'aux_resume', 'aux_sample', 'user_rdpmc',
+ 'user_time', 'user_time_zero', 'user_time_short') and hardware counter
+ bit-width ('pmc_width') when user-space counter reading is supported
+- Maximum number of events in a group counted simultaneously, without
+ multiplexing, and for core PMUs the maximum number of general-purpose
+ counter events. Groups larger than this may be accepted by
+ 'perf_event_open' but can't be counted together
+
+At the end of the text output, a summary section reports overall core PMU
+capabilities (including hardware AUX trace PMUs), memory and PCIe/IO
+interconnect bus bandwidth monitoring support, total events and metrics, and
+pipeline metric drill-down levels discovered via '<metric>_group' hierarchies.
+
+By default, numbered uncore PMU instances sharing a common prefix are collapsed
+into a single entry showing the instance count, unless '-v'/'--verbose' is
+specified.
+
+OPTIONS
+-------
+-i::
+--input=::
+ Input file name to read PMU information from (e.g. perf.data).
+
+-f::
+--force::
+ Don't complain, do it (when reading input perf.data file).
+
+-o::
+--output=::
+ Output file name.
+
+-p::
+--pmus::
+ Display detailed information for each PMU in addition to the system
+ summary.
+
+-j::
+--json::
+ Encode PMU information as JSON.
+
+-a::
+--all::
+-v::
+--verbose::
+ Display all PMUs including all similar PMUs with alphanumeric suffixes
+ instead of collapsing numbered uncore PMU instances.
+
+--probe::
+--no-probe::
+ Enable or disable active kernel probing of PMU capabilities on the live
+ system (default: enabled).
+
+--debug::
+ Enable debugging output.
+
+SEE ALSO
+--------
+linkperf:perf-list[1], linkperf:perf-evlist[1], linkperf:perf-stat[1],
+linkperf:perf-record[1]
diff --git a/tools/perf/Documentation/perf.txt b/tools/perf/Documentation/perf.txt
index cbcc2e4d557e..0890dd5a1794 100644
--- a/tools/perf/Documentation/perf.txt
+++ b/tools/perf/Documentation/perf.txt
@@ -92,5 +92,5 @@ linkperf:perf-help[1], linkperf:perf-inject[1],
linkperf:perf-intel-pt[1], linkperf:perf-iostat[1], linkperf:perf-kallsyms[1],
linkperf:perf-kmem[1], linkperf:perf-kvm[1], linkperf:perf-lock[1],
linkperf:perf-mem[1], linkperf:perf-probe[1], linkperf:perf-sched[1],
-linkperf:perf-script[1], linkperf:perf-test[1],
+linkperf:perf-script[1], linkperf:perf-sysinfo[1], linkperf:perf-test[1],
linkperf:perf-trace[1], linkperf:perf-version[1]
--
2.56.1.703.gf848ed807c-goog
next prev parent reply other threads:[~2026-11-13 19:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 19:55 [PATCH v2 00/16] perf sysinfo: Add subcommand to probe and summarize PMU capabilities Ian Rogers
2026-11-13 19:55 ` [PATCH v2 01/16] perf pmus: Expose duplicate uncore PMU scanning helpers Ian Rogers
2026-11-13 19:55 ` [PATCH v2 02/16] perf mem-events: Expose PMU init and name formatting helpers Ian Rogers
2026-11-13 19:55 ` [PATCH v2 03/16] perf pmu: Add perf_pmu__probe() for basic open, counting, and sampling Ian Rogers
2026-11-13 19:55 ` [PATCH v2 04/16] perf pmu: Probe supported sample_type flags Ian Rogers
2026-11-13 19:55 ` [PATCH v2 05/16] perf pmu: Probe precise_ip levels Ian Rogers
2026-11-13 19:55 ` [PATCH v2 06/16] perf pmu: Probe privilege exclusion modifiers Ian Rogers
2026-11-13 19:55 ` [PATCH v2 07/16] perf pmu: Probe execution and AUX area features Ian Rogers
2026-11-13 19:55 ` [PATCH v2 08/16] perf pmu: Probe event group size limits Ian Rogers
2026-11-13 19:55 ` [PATCH v2 09/16] perf pmu: Probe user and interrupt sample register masks Ian Rogers
2026-11-13 19:55 ` [PATCH v2 10/16] perf pmu: Probe interrupt registers that require precise sampling Ian Rogers
2026-11-13 19:55 ` [PATCH v2 11/16] perf pmu: Probe memory profiling events and sample formats Ian Rogers
2026-11-13 19:55 ` [PATCH v2 12/16] perf pmu: Probe user-space mmap capabilities Ian Rogers
2026-11-13 19:55 ` [PATCH v2 13/16] perf pmu: Probe branch instruction skid Ian Rogers
2026-11-13 19:55 ` [PATCH v2 14/16] perf sysinfo: Add sysinfo subcommand Ian Rogers
2026-11-13 19:56 ` Ian Rogers [this message]
2026-11-13 19:56 ` [PATCH v2 16/16] perf test: Add perf sysinfo shell test Ian Rogers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261113195601.2872738-16-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®