blob: 85b8ac695c871e7b50e34eb56c342b2a07ce9459 [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]
Li Zefan90b86a92009-12-10 15:21:57 +080011'perf kmem' {record|stat} [<options>]
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
17 'perf kmem record <command>' to record the kmem events
18 of an arbitrary workload.
19
Li Zefan90b86a92009-12-10 15:21:57 +080020 'perf kmem stat' to report kernel memory statistics.
Li Zefanb23d5762009-11-24 13:27:11 +080021
22OPTIONS
23-------
24-i <file>::
25--input=<file>::
Robert Richterefad1412011-12-07 10:02:54 +010026 Select the input file (default: perf.data unless stdin is a fifo)
Li Zefanb23d5762009-11-24 13:27:11 +080027
Sangwon Hong577980a2018-02-12 05:38:36 +090028-f::
29--force::
30 Don't do ownership validation
31
Namhyung Kimbd72a332015-03-12 16:32:47 +090032-v::
33--verbose::
34 Be more verbose. (show symbol address, etc)
35
Li Zefan90b86a92009-12-10 15:21:57 +080036--caller::
37 Show per-callsite statistics
38
39--alloc::
40 Show per-allocation statistics
Li Zefanb23d5762009-11-24 13:27:11 +080041
42-s <key[,key2...]>::
43--sort=<key[,key2...]>::
Namhyung Kimfb4f3132015-04-21 13:55:03 +090044 Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit'
45 for page). Available sort keys are 'ptr, callsite, bytes, hit,
46 pingpong, frag' for slab and 'page, callsite, bytes, hit, order,
47 migtype, gfp' for page. This option should be preceded by one of the
48 mode selection options - i.e. --slab, --page, --alloc and/or --caller.
Li Zefanb23d5762009-11-24 13:27:11 +080049
50-l <num>::
51--line=<num>::
52 Print n lines only
53
54--raw-ip::
55 Print raw ip instead of symbol
56
Namhyung Kim0d68bc92015-04-06 14:36:10 +090057--slab::
58 Analyze SLAB allocator events.
59
60--page::
61 Analyze page allocator events
62
Namhyung Kim2a7ef022015-04-21 13:55:04 +090063--live::
64 Show live page stat. The perf kmem shows total allocation stat by
65 default, but this option shows live (currently allocated) pages
66 instead. (This option works with --page option only)
67
Sangwon Hong577980a2018-02-12 05:38:36 +090068--time=<start>,<stop>::
David Ahern2a865bd2016-11-29 10:15:45 -070069 Only analyze samples within given time window: <start>,<stop>. Times
70 have the format seconds.microseconds. If start is not given (i.e., time
71 string is ',x.y') then analysis starts at the beginning of the file. If
72 stop time is not given (i.e, time string is 'x.y,') then analysis goes
73 to end of file.
74
Li Zefanb23d5762009-11-24 13:27:11 +080075SEE ALSO
76--------
77linkperf:perf-record[1]