'\" t .\" Title: perf-kmem .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-02-08 .\" Manual: perf Manual .\" Source: perf .\" Language: English .\" .TH "PERF\-KMEM" "1" "2024-02-08" "perf" "perf Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" perf-kmem \- Tool to trace/measure kernel memory properties .SH "SYNOPSIS" .sp .nf \fIperf kmem\fP [] {record|stat} .fi .br .SH "DESCRIPTION" .sp There are two variants of perf kmem: .sp .if n .RS 4 .nf .fam C \*(Aqperf kmem [] record [] \*(Aq to record the kmem events of an arbitrary workload. Additional \*(Aqperf record\*(Aq options may be specified after record, such as \*(Aq\-o\*(Aq to change the output file name. .fam .fi .if n .RE .sp .if n .RS 4 .nf .fam C \*(Aqperf kmem [] stat\*(Aq to report kernel memory statistics. .fam .fi .if n .RE .SH "OPTIONS" .sp \-i , \-\-input= .RS 4 For stat, select the input file (default: perf.data unless stdin is a fifo) .RE .sp \-f, \-\-force .RS 4 Don\(cqt do ownership validation .RE .sp \-v, \-\-verbose .RS 4 Be more verbose. (show symbol address, etc) .RE .sp \-\-caller .RS 4 Show per\-callsite statistics .RE .sp \-\-alloc .RS 4 Show per\-allocation statistics .RE .sp \-s , \-\-sort= .RS 4 Sort the output (default: \fIfrag,hit,bytes\fP for slab and \fIbytes,hit\fP for page). Available sort keys are \fIptr, callsite, bytes, hit, pingpong, frag\fP for slab and \fIpage, callsite, bytes, hit, order, migtype, gfp\fP for page. This option should be preceded by one of the mode selection options \- i.e. \-\-slab, \-\-page, \-\-alloc and/or \-\-caller. .RE .sp \-l , \-\-line= .RS 4 Print n lines only .RE .sp \-\-raw\-ip .RS 4 Print raw ip instead of symbol .RE .sp \-\-slab .RS 4 Analyze SLAB allocator events. .RE .sp \-\-page .RS 4 Analyze page allocator events .RE .sp \-\-live .RS 4 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) .RE .sp \-\-time=, .RS 4 Only analyze samples within given time window: ,. Times have the format seconds.microseconds. If start is not given (i.e., time string is \fI,x.y\fP) then analysis starts at the beginning of the file. If stop time is not given (i.e, time string is \fIx.y,\fP) then analysis goes to end of file. .RE .SH "SEE ALSO" .sp perf\-record(1)