trace: show more and exactly help information about snapshot
PATCH v2 1/1 trace: show more and exactly help information about snapshot
Actually, they both are correct:
default:
if (tr->allocated_snapshot) {
if (iter->cpu_file == RING_BUFFER_ALL_CPUS)
tracing_reset_online_cpus(&tr->max_buffer);
else
tracing_reset(&tr->max_buffer, iter->cpu_file);
}
break;
}It does nothing if it isn't allocated.
Perhaps we need it to say "(but does not allocate or free)"
-- Steve
---
I think "Clears and frees" are reasonable, and "Clears and allocates are not so reasonable, so we don't need to say not allocate. But it is help information, so make it more clearer is also acceptable. :)
kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace.c +1 -1
@@ -2760,7 +2760,7 @@ static void show_snapshot_main_help(struct seq_file *m)seq_printf (m,"# echo 0 > snapshot : Clears and frees snapshot buffer\n" );seq_printf (m,"# echo 1 > snapshot : Allocates snapshot buffer, if not already allocated.\n" );seq_printf (m,"# Takes a snapshot of the main buffer.\n" ); -seq_printf (m,"# echo 2 > snapshot : Clears snapshot buffer (but does not allocate)\n" ); +seq_printf (m,"# echo 2 > snapshot : Clears snapshot buffer (but does not allocate or free)\n" );seq_printf (m,"# (Doesn't have to be '2' works with any number that\n" );seq_printf (m,"# is not a '0' or '1')\n" ); }
Signature · 1 line
1.7.12.4.dirty
Steven Rostedt
maintainerQuoted 16 lines · On Sat, 14 Sep 2013 12:59:16 +0800 Wang YanQing <[email protected]> wrote:
Actually, they both are correct:
default: if (tr->allocated_snapshot) { if (iter->cpu_file == RING_BUFFER_ALL_CPUS) tracing_reset_online_cpus(&tr->max_buffer); else tracing_reset(&tr->max_buffer, iter->cpu_file); } break; }It does nothing if it isn't allocated.
Perhaps we need it to say "(but does not allocate or free)"
Quoted 8 lines
-- Steve
Signed-off-by Wang YanQing <[email protected]>---
I think "Clears and frees" are reasonable, and "Clears and allocates are not so reasonable, so we don't need to say not allocate. But it is help information, so make it more clearer is also acceptable. :)
I'm getting ready to go to Linux Con / Linux Plumbers. I wont be able to get to this before, and may not be able to get to it while I'm there. As the original is technically correct, I'll put this into my 3.13 queue.
Thanks,
-- Steve
Quoted 17 lines
kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/trace/trace.c +1
-1@@ -2760,7 +2760,7 @@ static void show_snapshot_main_help(struct seq_file *m)seq_printf (m,"# echo 0 > snapshot : Clears and frees snapshot buffer\n" );seq_printf (m,"# echo 1 > snapshot : Allocates snapshot buffer, if not already allocated.\n" );seq_printf (m,"# Takes a snapshot of the main buffer.\n" ); -seq_printf (m,"# echo 2 > snapshot : Clears snapshot buffer (but does not allocate)\n" ); +seq_printf (m,"# echo 2 > snapshot : Clears snapshot buffer (but does not allocate or free)\n" );seq_printf (m,"# (Doesn't have to be '2' works with any number that\n" );seq_printf (m,"# is not a '0' or '1')\n" ); }