xref: /aosp_15_r20/external/trace-cmd/Documentation/trace-cmd/trace-cmd-reset.1.txt (revision 58e6ee5f017f6a8912852c892d18457e4bafb554)
1TRACE-CMD-RESET(1)
2==================
3
4NAME
5----
6trace-cmd-reset - turn off all Ftrace tracing to bring back full performance
7
8SYNOPSIS
9--------
10*trace-cmd reset* ['OPTIONS']
11
12DESCRIPTION
13-----------
14The trace-cmd(1) reset command turns off all tracing of Ftrace. This will
15bring back the performance of the system before tracing was enabled. This is
16necessary since 'trace-cmd-record(1)', 'trace-cmd-stop(1)' and
17'trace-cmd-extract(1)' do not disable the tracer, event after the data has
18been pulled from the buffers. The rational is that the user may want to
19manually enable the tracer with the Ftrace pseudo file system, or examine other
20parts of Ftrace to see what trace-cmd did. After the reset command happens,
21the data in the ring buffer, and the options that were used are all lost.
22
23OPTIONS
24-------
25Please note that the order that options are specified on the command line is
26significant. See EXAMPLES.
27
28*-b* 'buffer_size'::
29    When the kernel boots, the Ftrace ring buffer is of a minimal size (3
30    pages per CPU). The first time the tracer is used, the ring buffer size
31    expands to what it was set for (default 1.4 Megs per CPU).
32
33    If no more tracing is to be done, this option allows you to shrink the
34    ring buffer down to free up available memory.
35
36    trace-cmd reset -b 1
37
38    The buffer instance affected is the one (or ones) specified by the most
39    recently preceding *-B*, *-t*, or *-a* option:
40
41    When used after *-B*, resizes the buffer instance that precedes it on
42    the command line.
43
44    When used after *-a*, resizes all buffer instances except the top one.
45
46    When used after *-t* or before any *-B* or *-a*, resizes the top
47    instance.
48
49*-B* 'buffer-name'::
50    If the kernel supports multiple buffers, this will reset the trace for
51    only the given buffer. It does not affect any other buffer. This may be
52    used multiple times to specify different buffers. The top level buffer
53    will not be reset if this option is given (unless the *-t* option is
54    also supplied).
55
56*-a*::
57    Reset the trace for all existing buffer instances. When this option
58    is used, the top level instance will not be reset unless *-t* is given.
59
60*-d*::
61    This option deletes the instance buffer(s) specified by the most recently
62    preceding *-B* or *-a* option. Because the top-level instance buffer
63    cannot be deleted, it is invalid to use this immediatly following *-t* or
64    prior to any *-B* or *-a* option on the command line.
65
66*-t*::
67    Resets the top level instance buffer. Without the *-B* or *-a* option
68    this is the same as the default. But if *-B* or *-a* is used, this is
69    required if the top level instance buffer should also be reset.
70
71EXAMPLES
72--------
73
74Reset tracing for instance-one and set its per-cpu buffer size to 4096kb.
75Also deletes instance-two. The top level instance and any other instances
76remain unaffected:
77
78    trace-cmd reset -B instance-one -b 4096 -B instance-two -d
79
80Delete all instance buffers. Top level instance remains unaffected:
81
82    trace-cmd reset -a -d
83
84Delete all instance buffers and also reset the top instance:
85
86    trace-cmd reset -t -a -d
87
88Invalid. This command implies an attempt to delete the top instance:
89
90    trace-cmd reset -a -t -d
91
92Reset the top instance and set its per-cpu buffer size to 1024kb. If any
93instance buffers exist, they will be unaffected:
94
95    trace-cmd reset -b 1024
96
97
98SEE ALSO
99--------
100trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
101trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-split(1),
102trace-cmd-list(1), trace-cmd-listen(1)
103
104AUTHOR
105------
106Written by Steven Rostedt, <[email protected]>
107
108RESOURCES
109---------
110https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
111
112COPYING
113-------
114Copyright \(C) 2010 Red Hat, Inc. Free use of this software is granted under
115the terms of the GNU Public License (GPL).
116
117