PERF-KMEM(1)                     perf Manual                    PERF-KMEM(1)

NAME         top

       perf-kmem - Tool to trace/measure kernel memory properties

SYNOPSIS         top

       perf kmem {record|stat} [<options>]

DESCRIPTION         top

       There are two variants of perf kmem:

           'perf kmem record <command>' to record the kmem events
           of an arbitrary workload.

           'perf kmem stat' to report kernel memory statistics.

OPTIONS         top

       -i <file>, --input=<file>
           Select the input file (default: unless stdin is a fifo)

       -f, --force
           Don’t do ownership validation

       -v, --verbose
           Be more verbose. (show symbol address, etc)

           Show per-callsite statistics

           Show per-allocation statistics

       -s <key[,key2...]>, --sort=<key[,key2...]>
           Sort the output (default: frag,hit,bytes for slab and bytes,hit
           for page). Available sort keys are ptr, callsite, bytes, hit,
           pingpong, frag for slab and page, callsite, bytes, hit, order,
           migtype, gfp for page. This option should be preceded by one of
           the mode selection options - i.e. --slab, --page, --alloc and/or

       -l <num>, --line=<num>
           Print n lines only

           Print raw ip instead of symbol

           Analyze SLAB allocator events.

           Analyze page allocator events

           Show live page stat. The perf kmem shows total allocation stat by
           default, but this option shows live (currently allocated) pages
           instead. (This option works with --page option only)

           Only analyze samples within given time window: <start>,<stop>.
           Times have the format seconds.microseconds. If start is not given
           (i.e., time string is ,x.y) then analysis starts at the beginning
           of the file. If stop time is not given (i.e, time string is x.y,)
           then analysis goes to end of file.

SEE ALSO         top


COLOPHON         top

       This page is part of the perf (Performance analysis tools for Linux
       (in Linux source tree)) project.  Information about the project can
       be found at ⟨⟩.  If
       you have a bug report for this manual page, send it to  This page was obtained from the
       project's upstream Git repository
       ⟨⟩ on
       2020-02-08.  (At that time, the date of the most recent commit that
       was found in the repository was 2020-02-07.)  If you discover any
       rendering problems in this HTML version of the page, or you believe
       there is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to

perf                             01/30/2020                     PERF-KMEM(1)