diff options
Diffstat (limited to 'kernel/trace/ring_buffer.c')
| -rw-r--r-- | kernel/trace/ring_buffer.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index ff7027199a9a..31a9edd7aa93 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
| @@ -1984,7 +1984,7 @@ rb_add_time_stamp(struct ring_buffer_event *event, u64 delta) | |||
| 1984 | 1984 | ||
| 1985 | /** | 1985 | /** |
| 1986 | * rb_update_event - update event type and data | 1986 | * rb_update_event - update event type and data |
| 1987 | * @event: the even to update | 1987 | * @event: the event to update |
| 1988 | * @type: the type of event | 1988 | * @type: the type of event |
| 1989 | * @length: the size of the event field in the ring buffer | 1989 | * @length: the size of the event field in the ring buffer |
| 1990 | * | 1990 | * |
| @@ -3764,12 +3764,14 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts) | |||
| 3764 | return NULL; | 3764 | return NULL; |
| 3765 | 3765 | ||
| 3766 | /* | 3766 | /* |
| 3767 | * We repeat when a time extend is encountered. | 3767 | * We repeat when a time extend is encountered or we hit |
| 3768 | * Since the time extend is always attached to a data event, | 3768 | * the end of the page. Since the time extend is always attached |
| 3769 | * we should never loop more than once. | 3769 | * to a data event, we should never loop more than three times. |
| 3770 | * (We never hit the following condition more than twice). | 3770 | * Once for going to next page, once on time extend, and |
| 3771 | * finally once to get the event. | ||
| 3772 | * (We never hit the following condition more than thrice). | ||
| 3771 | */ | 3773 | */ |
| 3772 | if (RB_WARN_ON(cpu_buffer, ++nr_loops > 2)) | 3774 | if (RB_WARN_ON(cpu_buffer, ++nr_loops > 3)) |
| 3773 | return NULL; | 3775 | return NULL; |
| 3774 | 3776 | ||
| 3775 | if (rb_per_cpu_empty(cpu_buffer)) | 3777 | if (rb_per_cpu_empty(cpu_buffer)) |
