Path: blob/master/tools/perf/Documentation/perf-kmem.txt
26282 views
perf-kmem(1)1============23NAME4----5perf-kmem - Tool to trace/measure kernel memory properties67SYNOPSIS8--------9[verse]10'perf kmem' [<options>] {record|stat}1112DESCRIPTION13-----------14There are two variants of perf kmem:1516'perf kmem [<options>] record [<perf-record-options>] <command>' to17record the kmem events of an arbitrary workload. Additional 'perf18record' options may be specified after record, such as '-o' to19change the output file name.2021'perf kmem [<options>] stat' to report kernel memory statistics.2223OPTIONS24-------25-i <file>::26--input=<file>::27For stat, select the input file (default: perf.data unless stdin is a28fifo)2930-f::31--force::32Don't do ownership validation3334-v::35--verbose::36Be more verbose. (show symbol address, etc)3738--caller::39Show per-callsite statistics4041--alloc::42Show per-allocation statistics4344-s <key[,key2...]>::45--sort=<key[,key2...]>::46Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit'47for page). Available sort keys are 'ptr, callsite, bytes, hit,48pingpong, frag' for slab and 'page, callsite, bytes, hit, order,49migtype, gfp' for page. This option should be preceded by one of the50mode selection options - i.e. --slab, --page, --alloc and/or --caller.5152-l <num>::53--line=<num>::54Print n lines only5556--raw-ip::57Print raw ip instead of symbol5859--slab::60Analyze SLAB allocator events.6162--page::63Analyze page allocator events6465--live::66Show live page stat. The perf kmem shows total allocation stat by67default, but this option shows live (currently allocated) pages68instead. (This option works with --page option only)6970--time=<start>,<stop>::71Only analyze samples within given time window: <start>,<stop>. Times72have the format seconds.microseconds. If start is not given (i.e., time73string is ',x.y') then analysis starts at the beginning of the file. If74stop time is not given (i.e, time string is 'x.y,') then analysis goes75to end of file.7677SEE ALSO78--------79linkperf:perf-record[1]808182