blob: f378ac59353d527630a13a8f1e82bc34c2e45307 [file] [log] [blame]
Li Zefanb23d5762009-11-24 13:27:11 +08001perf-kmem(1)
Arnaldo Carvalho de Melo4778e0e2010-05-05 11:23:27 -03002============
Li Zefanb23d5762009-11-24 13:27:11 +08003
4NAME
5----
Namhyung Kim0d68bc92015-04-06 14:36:10 +09006perf-kmem - Tool to trace/measure kernel memory properties
Li Zefanb23d5762009-11-24 13:27:11 +08007
8SYNOPSIS
9--------
10[verse]
Ian Rogersf792cf82021-09-22 14:20:31 -070011'perf kmem' [<options>] {record|stat}
Li Zefanb23d5762009-11-24 13:27:11 +080012
13DESCRIPTION
14-----------
Li Zefan90b86a92009-12-10 15:21:57 +080015There are two variants of perf kmem:
Li Zefanb23d5762009-11-24 13:27:11 +080016
Ian Rogersf792cf82021-09-22 14:20:31 -070017 'perf kmem [<options>] record [<perf-record-options>] <command>' to
18 record the kmem events of an arbitrary workload. Additional 'perf
19 record' options may be specified after record, such as '-o' to
20 change the output file name.
Li Zefanb23d5762009-11-24 13:27:11 +080021
Ian Rogersf792cf82021-09-22 14:20:31 -070022 'perf kmem [<options>] stat' to report kernel memory statistics.
Li Zefanb23d5762009-11-24 13:27:11 +080023
24OPTIONS
25-------
26-i <file>::
27--input=<file>::
Ian Rogersf792cf82021-09-22 14:20:31 -070028 For stat, select the input file (default: perf.data unless stdin is a
29 fifo)
Li Zefanb23d5762009-11-24 13:27:11 +080030
Sangwon Hong577980a2018-02-12 05:38:36 +090031-f::
32--force::
33 Don't do ownership validation
34
Namhyung Kimbd72a332015-03-12 16:32:47 +090035-v::
36--verbose::
37 Be more verbose. (show symbol address, etc)
38
Li Zefan90b86a92009-12-10 15:21:57 +080039--caller::
40 Show per-callsite statistics
41
42--alloc::
43 Show per-allocation statistics
Li Zefanb23d5762009-11-24 13:27:11 +080044
45-s <key[,key2...]>::
46--sort=<key[,key2...]>::
Namhyung Kimfb4f3132015-04-21 13:55:03 +090047 Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit'
48 for page). Available sort keys are 'ptr, callsite, bytes, hit,
49 pingpong, frag' for slab and 'page, callsite, bytes, hit, order,
50 migtype, gfp' for page. This option should be preceded by one of the
51 mode selection options - i.e. --slab, --page, --alloc and/or --caller.
Li Zefanb23d5762009-11-24 13:27:11 +080052
53-l <num>::
54--line=<num>::
55 Print n lines only
56
57--raw-ip::
58 Print raw ip instead of symbol
59
Namhyung Kim0d68bc92015-04-06 14:36:10 +090060--slab::
61 Analyze SLAB allocator events.
62
63--page::
64 Analyze page allocator events
65
Namhyung Kim2a7ef022015-04-21 13:55:04 +090066--live::
67 Show live page stat. The perf kmem shows total allocation stat by
68 default, but this option shows live (currently allocated) pages
69 instead. (This option works with --page option only)
70
Sangwon Hong577980a2018-02-12 05:38:36 +090071--time=<start>,<stop>::
David Ahern2a865bd2016-11-29 10:15:45 -070072 Only analyze samples within given time window: <start>,<stop>. Times
73 have the format seconds.microseconds. If start is not given (i.e., time
74 string is ',x.y') then analysis starts at the beginning of the file. If
75 stop time is not given (i.e, time string is 'x.y,') then analysis goes
76 to end of file.
77
Li Zefanb23d5762009-11-24 13:27:11 +080078SEE ALSO
79--------
80linkperf:perf-record[1]