^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) perf-kmem(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) NAME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) perf-kmem - Tool to trace/measure kernel memory properties
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) SYNOPSIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) [verse]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 'perf kmem' {record|stat} [<options>]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) DESCRIPTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) There are two variants of perf kmem:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 'perf kmem record <command>' to record the kmem events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) of an arbitrary workload.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 'perf kmem stat' to report kernel memory statistics.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) OPTIONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) -------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) -i <file>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) --input=<file>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Select the input file (default: perf.data unless stdin is a fifo)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) -f::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) --force::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) Don't do ownership validation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) -v::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) --verbose::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) Be more verbose. (show symbol address, etc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) --caller::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) Show per-callsite statistics
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) --alloc::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) Show per-allocation statistics
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) -s <key[,key2...]>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) --sort=<key[,key2...]>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) for page). Available sort keys are 'ptr, callsite, bytes, hit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) pingpong, frag' for slab and 'page, callsite, bytes, hit, order,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) migtype, gfp' for page. This option should be preceded by one of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) mode selection options - i.e. --slab, --page, --alloc and/or --caller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) -l <num>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) --line=<num>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) Print n lines only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) --raw-ip::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) Print raw ip instead of symbol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) --slab::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) Analyze SLAB allocator events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) --page::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) Analyze page allocator events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) --live::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) Show live page stat. The perf kmem shows total allocation stat by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) default, but this option shows live (currently allocated) pages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) instead. (This option works with --page option only)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) --time=<start>,<stop>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) Only analyze samples within given time window: <start>,<stop>. Times
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) have the format seconds.microseconds. If start is not given (i.e., time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) string is ',x.y') then analysis starts at the beginning of the file. If
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) stop time is not given (i.e, time string is 'x.y,') then analysis goes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) to end of file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) SEE ALSO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) linkperf:perf-record[1]