summaryrefslogtreecommitdiff
path: root/tools/perf/Documentation/perf-kmem.txt
blob: f378ac59353d527630a13a8f1e82bc34c2e45307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
perf-kmem(1)
============

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

SYNOPSIS
--------
[verse]
'perf kmem' [<options>] {record|stat}

DESCRIPTION
-----------
There are two variants of perf kmem:

  'perf kmem [<options>] record [<perf-record-options>] <command>' to
  record the kmem events of an arbitrary workload. Additional 'perf
  record' options may be specified after record, such as '-o' to
  change the output file name.

  'perf kmem [<options>] stat' to report kernel memory statistics.

OPTIONS
-------
-i <file>::
--input=<file>::
	For stat, select the input file (default: perf.data unless stdin is a
	fifo)

-f::
--force::
	Don't do ownership validation

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

--caller::
	Show per-callsite statistics

--alloc::
	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 --caller.

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

--raw-ip::
	Print raw ip instead of symbol

--slab::
	Analyze SLAB allocator events.

--page::
	Analyze page allocator events

--live::
	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)

--time=<start>,<stop>::
	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
--------
linkperf:perf-record[1]