tools/perf/Documentation/perf-kmem.txt
Source file repositories/reference/linux-study-clean/tools/perf/Documentation/perf-kmem.txt
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/Documentation/perf-kmem.txt- Extension
.txt- Size
- 1987 bytes
- Lines
- 81
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
perf-kmem(1)
============
NAME
----
perf-kmem - Tool to trace/measure kernel memory properties
SYNOPSIS
--------
[verse]
'perf kmem' [<options>] {record|stat}
DESCRIPTION
-----------
There are two variants of perf kmem:
'perf kmem [<options>] record [<perf-record-options>] <command>' to
record the kmem events of an arbitrary workload. Additional 'perf
record' options may be specified after record, such as '-o' to
change the output file name.
'perf kmem [<options>] stat' to report kernel memory statistics.
OPTIONS
-------
-i <file>::
--input=<file>::
For stat, select the input file (default: perf.data unless stdin is a
fifo)
-f::
--force::
Don't do ownership validation
-v::
--verbose::
Be more verbose. (show symbol address, etc)
--caller::
Show per-callsite statistics
--alloc::
Show per-allocation statistics
-s <key[,key2...]>::
--sort=<key[,key2...]>::
Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit'
for page). Available sort keys are 'ptr, callsite, bytes, hit,
pingpong, frag' for slab and 'page, callsite, bytes, hit, order,
migtype, gfp' for page. This option should be preceded by one of the
mode selection options - i.e. --slab, --page, --alloc and/or --caller.
-l <num>::
--line=<num>::
Print n lines only
--raw-ip::
Print raw ip instead of symbol
--slab::
Analyze SLAB allocator events.
--page::
Analyze page allocator events
--live::
Show live page stat. The perf kmem shows total allocation stat by
default, but this option shows live (currently allocated) pages
instead. (This option works with --page option only)
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.