diff options
-rw-r--r-- | Documentation/ftrace.txt | 18 | ||||
-rw-r--r-- | kernel/trace/trace.c | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt index 9cc4d685dde5..a1b58777839b 100644 --- a/Documentation/ftrace.txt +++ b/Documentation/ftrace.txt | |||
@@ -94,7 +94,7 @@ 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 | trace_entries: This sets or displays the number of bytes each CPU | 97 | buffer_size_kb: This sets or displays the number of bytes 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 |
@@ -1299,13 +1299,13 @@ trace entries | |||
1299 | ------------- | 1299 | ------------- |
1300 | 1300 | ||
1301 | Having too much or not enough data can be troublesome in diagnosing | 1301 | Having too much or not enough data can be troublesome in diagnosing |
1302 | an issue in the kernel. The file trace_entries is used to modify | 1302 | an issue in the kernel. The file buffer_size_kb is used to modify |
1303 | the size of the internal trace buffers. The number listed | 1303 | the size of the internal trace buffers. The number listed |
1304 | is the number of entries that can be recorded per CPU. To know | 1304 | is the number of entries that can be recorded per CPU. To know |
1305 | the full size, multiply the number of possible CPUS with the | 1305 | the full size, multiply the number of possible CPUS with the |
1306 | number of entries. | 1306 | number of entries. |
1307 | 1307 | ||
1308 | # cat /debug/tracing/trace_entries | 1308 | # cat /debug/tracing/buffer_size_kb |
1309 | 65620 | 1309 | 65620 |
1310 | 1310 | ||
1311 | Note, to modify this, you must have tracing completely disabled. To do that, | 1311 | Note, to modify this, you must have tracing completely disabled. To do that, |
@@ -1313,8 +1313,8 @@ echo "nop" into the current_tracer. If the current_tracer is not set | |||
1313 | to "nop", an EINVAL error will be returned. | 1313 | to "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/trace_entries | 1316 | # echo 100000 > /debug/tracing/buffer_size_kb |
1317 | # cat /debug/tracing/trace_entries | 1317 | # cat /debug/tracing/buffer_size_kb |
1318 | 100045 | 1318 | 100045 |
1319 | 1319 | ||
1320 | 1320 | ||
@@ -1323,8 +1323,8 @@ are held in individual pages. It allocates the number of pages it takes | |||
1323 | to fulfill the request. If more entries may fit on the last page | 1323 | to fulfill the request. If more entries may fit on the last page |
1324 | then they will be added. | 1324 | then they will be added. |
1325 | 1325 | ||
1326 | # echo 1 > /debug/tracing/trace_entries | 1326 | # echo 1 > /debug/tracing/buffer_size_kb |
1327 | # cat /debug/tracing/trace_entries | 1327 | # cat /debug/tracing/buffer_size_kb |
1328 | 85 | 1328 | 85 |
1329 | 1329 | ||
1330 | This shows us that 85 entries can fit in a single page. | 1330 | This shows us that 85 entries can fit in a single page. |
@@ -1332,8 +1332,8 @@ This shows us that 85 entries can fit in a single page. | |||
1332 | The number of pages which will be allocated is limited to a percentage | 1332 | The number of pages which will be allocated is limited to a percentage |
1333 | of available memory. Allocating too much will produce an error. | 1333 | of available memory. Allocating too much will produce an error. |
1334 | 1334 | ||
1335 | # echo 1000000000000 > /debug/tracing/trace_entries | 1335 | # echo 1000000000000 > /debug/tracing/buffer_size_kb |
1336 | -bash: echo: write error: Cannot allocate memory | 1336 | -bash: echo: write error: Cannot allocate memory |
1337 | # cat /debug/tracing/trace_entries | 1337 | # cat /debug/tracing/buffer_size_kb |
1338 | 85 | 1338 | 85 |
1339 | 1339 | ||
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 4bf070bb5272..b42d42056fa4 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -3198,11 +3198,11 @@ static __init int tracer_init_debugfs(void) | |||
3198 | pr_warning("Could not create debugfs " | 3198 | pr_warning("Could not create debugfs " |
3199 | "'trace_pipe' entry\n"); | 3199 | "'trace_pipe' entry\n"); |
3200 | 3200 | ||
3201 | entry = debugfs_create_file("trace_entries", 0644, d_tracer, | 3201 | entry = debugfs_create_file("buffer_size_kb", 0644, d_tracer, |
3202 | &global_trace, &tracing_entries_fops); | 3202 | &global_trace, &tracing_entries_fops); |
3203 | if (!entry) | 3203 | if (!entry) |
3204 | pr_warning("Could not create debugfs " | 3204 | pr_warning("Could not create debugfs " |
3205 | "'trace_entries' entry\n"); | 3205 | "'buffer_size_kb' entry\n"); |
3206 | 3206 | ||
3207 | entry = debugfs_create_file("trace_marker", 0220, d_tracer, | 3207 | entry = debugfs_create_file("trace_marker", 0220, d_tracer, |
3208 | NULL, &tracing_mark_fops); | 3208 | NULL, &tracing_mark_fops); |