Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180097
b: refs/heads/master
c: 3c05d74
h: refs/heads/master
i:
  180095: 2f7ed94
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jan 26, 2010
1 parent 09e8217 commit badeb1a
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 492a74f4210e15f4701422e2e1c4cd3c1e45ddae
refs/heads/master: 3c05d7482777f15e71bb4cb1ba78dee2800dfec6
11 changes: 8 additions & 3 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3064,9 +3064,6 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
struct ring_buffer_event *event;
int nr_loops = 0;

if (ring_buffer_iter_empty(iter))
return NULL;

cpu_buffer = iter->cpu_buffer;
buffer = cpu_buffer->buffer;

Expand All @@ -3080,6 +3077,9 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
rb_iter_reset(iter);

again:
if (ring_buffer_iter_empty(iter))
return NULL;

/*
* We repeat when a timestamp is encountered.
* We can get multiple timestamps by nested interrupts or also
Expand All @@ -3094,6 +3094,11 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
if (rb_per_cpu_empty(cpu_buffer))
return NULL;

if (iter->head >= local_read(&iter->head_page->page->commit)) {
rb_inc_iter(iter);
goto again;
}

event = rb_iter_head_event(iter);

switch (event->type_len) {
Expand Down

0 comments on commit badeb1a

Please sign in to comment.