aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ftrace.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/ftrace.txt')
-rw-r--r--Documentation/ftrace.txt22
1 files changed, 5 insertions, 17 deletions
diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt
index a1b58777839b..6d3fe4cdf921 100644
--- a/Documentation/ftrace.txt
+++ b/Documentation/ftrace.txt
@@ -94,10 +94,10 @@ of ftrace. Here is a list of some of the key files:
94 only be recorded if the latency is greater than 94 only be recorded if the latency is greater than
95 the value in this file. (in microseconds) 95 the value in this file. (in microseconds)
96 96
97 buffer_size_kb: This sets or displays the number of bytes each CPU 97 buffer_size_kb: This sets or displays the number of kilobytes each CPU
98 buffer can hold. The tracer buffers are the same size 98 buffer can hold. The tracer buffers are the same size
99 for each CPU. The displayed number is the size of the 99 for each CPU. The displayed number is the size of the
100 CPU buffer and not total size of all buffers. The 100 CPU buffer and not total size of all buffers. The
101 trace buffers are allocated in pages (blocks of memory 101 trace buffers are allocated in pages (blocks of memory
102 that the kernel uses for allocation, usually 4 KB in size). 102 that the kernel uses for allocation, usually 4 KB in size).
103 If the last page allocated has room for more bytes 103 If the last page allocated has room for more bytes
@@ -1306,28 +1306,16 @@ the full size, multiply the number of possible CPUS with the
1306number of entries. 1306number of entries.
1307 1307
1308 # cat /debug/tracing/buffer_size_kb 1308 # cat /debug/tracing/buffer_size_kb
130965620 13091408 (units kilobytes)
1310 1310
1311Note, to modify this, you must have tracing completely disabled. To do that, 1311Note, to modify this, you must have tracing completely disabled. To do that,
1312echo "nop" into the current_tracer. If the current_tracer is not set 1312echo "nop" into the current_tracer. If the current_tracer is not set
1313to "nop", an EINVAL error will be returned. 1313to "nop", an EINVAL error will be returned.
1314 1314
1315 # echo nop > /debug/tracing/current_tracer 1315 # echo nop > /debug/tracing/current_tracer
1316 # echo 100000 > /debug/tracing/buffer_size_kb 1316 # echo 10000 > /debug/tracing/buffer_size_kb
1317 # cat /debug/tracing/buffer_size_kb 1317 # cat /debug/tracing/buffer_size_kb
1318100045 131810000 (units kilobytes)
1319
1320
1321Notice that we echoed in 100,000 but the size is 100,045. The entries
1322are held in individual pages. It allocates the number of pages it takes
1323to fulfill the request. If more entries may fit on the last page
1324then they will be added.
1325
1326 # echo 1 > /debug/tracing/buffer_size_kb
1327 # cat /debug/tracing/buffer_size_kb
132885
1329
1330This shows us that 85 entries can fit in a single page.
1331 1319
1332The number of pages which will be allocated is limited to a percentage 1320The number of pages which will be allocated is limited to a percentage
1333of available memory. Allocating too much will produce an error. 1321of available memory. Allocating too much will produce an error.