0001 perf-kmem(1)
0002 ============
0003
0004 NAME
0005 ----
0006 perf-kmem - Tool to trace/measure kernel memory properties
0007
0008 SYNOPSIS
0009 --------
0010 [verse]
0011 'perf kmem' [<options>] {record|stat}
0012
0013 DESCRIPTION
0014 -----------
0015 There are two variants of perf kmem:
0016
0017 'perf kmem [<options>] record [<perf-record-options>] <command>' to
0018 record the kmem events of an arbitrary workload. Additional 'perf
0019 record' options may be specified after record, such as '-o' to
0020 change the output file name.
0021
0022 'perf kmem [<options>] stat' to report kernel memory statistics.
0023
0024 OPTIONS
0025 -------
0026 -i <file>::
0027 --input=<file>::
0028 For stat, select the input file (default: perf.data unless stdin is a
0029 fifo)
0030
0031 -f::
0032 --force::
0033 Don't do ownership validation
0034
0035 -v::
0036 --verbose::
0037 Be more verbose. (show symbol address, etc)
0038
0039 --caller::
0040 Show per-callsite statistics
0041
0042 --alloc::
0043 Show per-allocation statistics
0044
0045 -s <key[,key2...]>::
0046 --sort=<key[,key2...]>::
0047 Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit'
0048 for page). Available sort keys are 'ptr, callsite, bytes, hit,
0049 pingpong, frag' for slab and 'page, callsite, bytes, hit, order,
0050 migtype, gfp' for page. This option should be preceded by one of the
0051 mode selection options - i.e. --slab, --page, --alloc and/or --caller.
0052
0053 -l <num>::
0054 --line=<num>::
0055 Print n lines only
0056
0057 --raw-ip::
0058 Print raw ip instead of symbol
0059
0060 --slab::
0061 Analyze SLAB allocator events.
0062
0063 --page::
0064 Analyze page allocator events
0065
0066 --live::
0067 Show live page stat. The perf kmem shows total allocation stat by
0068 default, but this option shows live (currently allocated) pages
0069 instead. (This option works with --page option only)
0070
0071 --time=<start>,<stop>::
0072 Only analyze samples within given time window: <start>,<stop>. Times
0073 have the format seconds.microseconds. If start is not given (i.e., time
0074 string is ',x.y') then analysis starts at the beginning of the file. If
0075 stop time is not given (i.e, time string is 'x.y,') then analysis goes
0076 to end of file.
0077
0078 SEE ALSO
0079 --------
0080 linkperf:perf-record[1]