xref: /linux/tools/perf/Documentation/perf-kmem.txt (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1b23d5767SLi Zefanperf-kmem(1)
24778e0e8SArnaldo Carvalho de Melo============
3b23d5767SLi Zefan
4b23d5767SLi ZefanNAME
5b23d5767SLi Zefan----
60d68bc92SNamhyung Kimperf-kmem - Tool to trace/measure kernel memory properties
7b23d5767SLi Zefan
8b23d5767SLi ZefanSYNOPSIS
9b23d5767SLi Zefan--------
10b23d5767SLi Zefan[verse]
11*f792cf8aSIan Rogers'perf kmem' [<options>] {record|stat}
12b23d5767SLi Zefan
13b23d5767SLi ZefanDESCRIPTION
14b23d5767SLi Zefan-----------
1590b86a9fSLi ZefanThere are two variants of perf kmem:
16b23d5767SLi Zefan
17*f792cf8aSIan Rogers  'perf kmem [<options>] record [<perf-record-options>] <command>' to
18*f792cf8aSIan Rogers  record the kmem events of an arbitrary workload. Additional 'perf
19*f792cf8aSIan Rogers  record' options may be specified after record, such as '-o' to
20*f792cf8aSIan Rogers  change the output file name.
21b23d5767SLi Zefan
22*f792cf8aSIan Rogers  'perf kmem [<options>] stat' to report kernel memory statistics.
23b23d5767SLi Zefan
24b23d5767SLi ZefanOPTIONS
25b23d5767SLi Zefan-------
26b23d5767SLi Zefan-i <file>::
27b23d5767SLi Zefan--input=<file>::
28*f792cf8aSIan Rogers	For stat, select the input file (default: perf.data unless stdin is a
29*f792cf8aSIan Rogers	fifo)
30b23d5767SLi Zefan
31577980a0SSangwon Hong-f::
32577980a0SSangwon Hong--force::
33577980a0SSangwon Hong	Don't do ownership validation
34577980a0SSangwon Hong
35bd72a33eSNamhyung Kim-v::
36bd72a33eSNamhyung Kim--verbose::
37bd72a33eSNamhyung Kim        Be more verbose. (show symbol address, etc)
38bd72a33eSNamhyung Kim
3990b86a9fSLi Zefan--caller::
4090b86a9fSLi Zefan	Show per-callsite statistics
4190b86a9fSLi Zefan
4290b86a9fSLi Zefan--alloc::
4390b86a9fSLi Zefan	Show per-allocation statistics
44b23d5767SLi Zefan
45b23d5767SLi Zefan-s <key[,key2...]>::
46b23d5767SLi Zefan--sort=<key[,key2...]>::
47fb4f313dSNamhyung Kim	Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit'
48fb4f313dSNamhyung Kim	for page).  Available sort keys are 'ptr, callsite, bytes, hit,
49fb4f313dSNamhyung Kim	pingpong, frag' for slab and 'page, callsite, bytes, hit, order,
50fb4f313dSNamhyung Kim	migtype, gfp' for page.  This option should be preceded by one of the
51fb4f313dSNamhyung Kim	mode selection options - i.e. --slab, --page, --alloc and/or --caller.
52b23d5767SLi Zefan
53b23d5767SLi Zefan-l <num>::
54b23d5767SLi Zefan--line=<num>::
55b23d5767SLi Zefan	Print n lines only
56b23d5767SLi Zefan
57b23d5767SLi Zefan--raw-ip::
58b23d5767SLi Zefan	Print raw ip instead of symbol
59b23d5767SLi Zefan
600d68bc92SNamhyung Kim--slab::
610d68bc92SNamhyung Kim	Analyze SLAB allocator events.
620d68bc92SNamhyung Kim
630d68bc92SNamhyung Kim--page::
640d68bc92SNamhyung Kim	Analyze page allocator events
650d68bc92SNamhyung Kim
662a7ef02cSNamhyung Kim--live::
672a7ef02cSNamhyung Kim	Show live page stat.  The perf kmem shows total allocation stat by
682a7ef02cSNamhyung Kim	default, but this option shows live (currently allocated) pages
692a7ef02cSNamhyung Kim	instead.  (This option works with --page option only)
702a7ef02cSNamhyung Kim
71577980a0SSangwon Hong--time=<start>,<stop>::
722a865bd8SDavid Ahern	Only analyze samples within given time window: <start>,<stop>. Times
732a865bd8SDavid Ahern	have the format seconds.microseconds. If start is not given (i.e., time
742a865bd8SDavid Ahern	string is ',x.y') then analysis starts at the beginning of the file. If
752a865bd8SDavid Ahern	stop time is not given (i.e, time string is 'x.y,') then analysis goes
762a865bd8SDavid Ahern	to end of file.
772a865bd8SDavid Ahern
78b23d5767SLi ZefanSEE ALSO
79b23d5767SLi Zefan--------
80b23d5767SLi Zefanlinkperf:perf-record[1]
81