diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-12 11:21:08 -0400 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-12 21:14:58 -0400 |
commit | a123c52b46a1f84bcec3dc963351896c6d6afaf7 (patch) | |
tree | bbfea12d2234930fd67644fa281d11c8ab850460 | |
parent | 51b643b404827d8fde60d7953773a42d46ca87e0 (diff) |
tracing: fix comments about trace buffer resizing
Impact: cleanup
Some of the comments about the trace buffer resizing is gobbledygook.
And I wonder why people question if I'm a native English speaker.
This patch makes the comments make a bit more sense.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
-rw-r--r-- | kernel/trace/trace.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c3946a6df34e..c61ee85c50bb 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -2336,7 +2336,8 @@ static int tracing_resize_ring_buffer(unsigned long size) | |||
2336 | 2336 | ||
2337 | /* | 2337 | /* |
2338 | * If kernel or user changes the size of the ring buffer | 2338 | * If kernel or user changes the size of the ring buffer |
2339 | * it get completed. | 2339 | * we use the size that was given, and we can forget about |
2340 | * expanding it later. | ||
2340 | */ | 2341 | */ |
2341 | ring_buffer_expanded = 1; | 2342 | ring_buffer_expanded = 1; |
2342 | 2343 | ||
@@ -2351,8 +2352,20 @@ static int tracing_resize_ring_buffer(unsigned long size) | |||
2351 | r = ring_buffer_resize(global_trace.buffer, | 2352 | r = ring_buffer_resize(global_trace.buffer, |
2352 | global_trace.entries); | 2353 | global_trace.entries); |
2353 | if (r < 0) { | 2354 | if (r < 0) { |
2354 | /* AARGH! We are left with different | 2355 | /* |
2355 | * size max buffer!!!! */ | 2356 | * AARGH! We are left with different |
2357 | * size max buffer!!!! | ||
2358 | * The max buffer is our "snapshot" buffer. | ||
2359 | * When a tracer needs a snapshot (one of the | ||
2360 | * latency tracers), it swaps the max buffer | ||
2361 | * with the saved snap shot. We succeeded to | ||
2362 | * update the size of the main buffer, but failed to | ||
2363 | * update the size of the max buffer. But when we tried | ||
2364 | * to reset the main buffer to the original size, we | ||
2365 | * failed there too. This is very unlikely to | ||
2366 | * happen, but if it does, warn and kill all | ||
2367 | * tracing. | ||
2368 | */ | ||
2356 | WARN_ON(1); | 2369 | WARN_ON(1); |
2357 | tracing_disabled = 1; | 2370 | tracing_disabled = 1; |
2358 | } | 2371 | } |