Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140925
b: refs/heads/master
c: a123c52
h: refs/heads/master
i:
  140923: 751cf57
v: v3
  • Loading branch information
Steven Rostedt committed Mar 13, 2009
1 parent 02bcd0c commit ec57eed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51b643b404827d8fde60d7953773a42d46ca87e0
refs/heads/master: a123c52b46a1f84bcec3dc963351896c6d6afaf7
19 changes: 16 additions & 3 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,8 @@ static int tracing_resize_ring_buffer(unsigned long size)

/*
* If kernel or user changes the size of the ring buffer
* it get completed.
* we use the size that was given, and we can forget about
* expanding it later.
*/
ring_buffer_expanded = 1;

Expand All @@ -2351,8 +2352,20 @@ static int tracing_resize_ring_buffer(unsigned long size)
r = ring_buffer_resize(global_trace.buffer,
global_trace.entries);
if (r < 0) {
/* AARGH! We are left with different
* size max buffer!!!! */
/*
* AARGH! We are left with different
* size max buffer!!!!
* The max buffer is our "snapshot" buffer.
* When a tracer needs a snapshot (one of the
* latency tracers), it swaps the max buffer
* with the saved snap shot. We succeeded to
* update the size of the main buffer, but failed to
* update the size of the max buffer. But when we tried
* to reset the main buffer to the original size, we
* failed there too. This is very unlikely to
* happen, but if it does, warn and kill all
* tracing.
*/
WARN_ON(1);
tracing_disabled = 1;
}
Expand Down

0 comments on commit ec57eed

Please sign in to comment.