diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-08-11 08:19:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-11 08:19:09 -0400 |
commit | 89034bc2c7b839702c00a704e79d112737f98be0 (patch) | |
tree | e65b1f3d4c751baa840efc81bc4734f089379eb3 /kernel/trace/ring_buffer.c | |
parent | fb82ad719831db58e9baa4c67015aae3fe27e7e3 (diff) | |
parent | 85dfd81dc57e8183a277ddd7a56aa65c96f3f487 (diff) |
Merge branch 'linus' into tracing/core
Conflicts:
kernel/trace/trace_events_filter.c
We use the tracing/core version.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 51633d74a21e..da2c59d8f486 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -1170,6 +1170,7 @@ ring_buffer_free(struct ring_buffer *buffer) | |||
1170 | 1170 | ||
1171 | put_online_cpus(); | 1171 | put_online_cpus(); |
1172 | 1172 | ||
1173 | kfree(buffer->buffers); | ||
1173 | free_cpumask_var(buffer->cpumask); | 1174 | free_cpumask_var(buffer->cpumask); |
1174 | 1175 | ||
1175 | kfree(buffer); | 1176 | kfree(buffer); |
@@ -2379,7 +2380,7 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer, | |||
2379 | */ | 2380 | */ |
2380 | RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing)); | 2381 | RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing)); |
2381 | 2382 | ||
2382 | if (!rb_try_to_discard(cpu_buffer, event)) | 2383 | if (rb_try_to_discard(cpu_buffer, event)) |
2383 | goto out; | 2384 | goto out; |
2384 | 2385 | ||
2385 | /* | 2386 | /* |
@@ -2990,7 +2991,6 @@ rb_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts) | |||
2990 | * the box. Return the padding, and we will release | 2991 | * the box. Return the padding, and we will release |
2991 | * the current locks, and try again. | 2992 | * the current locks, and try again. |
2992 | */ | 2993 | */ |
2993 | rb_advance_reader(cpu_buffer); | ||
2994 | return event; | 2994 | return event; |
2995 | 2995 | ||
2996 | case RINGBUF_TYPE_TIME_EXTEND: | 2996 | case RINGBUF_TYPE_TIME_EXTEND: |
@@ -3093,7 +3093,7 @@ static inline int rb_ok_to_lock(void) | |||
3093 | * buffer too. A one time deal is all you get from reading | 3093 | * buffer too. A one time deal is all you get from reading |
3094 | * the ring buffer from an NMI. | 3094 | * the ring buffer from an NMI. |
3095 | */ | 3095 | */ |
3096 | if (likely(!in_nmi() && !oops_in_progress)) | 3096 | if (likely(!in_nmi())) |
3097 | return 1; | 3097 | return 1; |
3098 | 3098 | ||
3099 | tracing_off_permanent(); | 3099 | tracing_off_permanent(); |
@@ -3126,6 +3126,8 @@ ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts) | |||
3126 | if (dolock) | 3126 | if (dolock) |
3127 | spin_lock(&cpu_buffer->reader_lock); | 3127 | spin_lock(&cpu_buffer->reader_lock); |
3128 | event = rb_buffer_peek(buffer, cpu, ts); | 3128 | event = rb_buffer_peek(buffer, cpu, ts); |
3129 | if (event && event->type_len == RINGBUF_TYPE_PADDING) | ||
3130 | rb_advance_reader(cpu_buffer); | ||
3129 | if (dolock) | 3131 | if (dolock) |
3130 | spin_unlock(&cpu_buffer->reader_lock); | 3132 | spin_unlock(&cpu_buffer->reader_lock); |
3131 | local_irq_restore(flags); | 3133 | local_irq_restore(flags); |
@@ -3197,12 +3199,9 @@ ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts) | |||
3197 | spin_lock(&cpu_buffer->reader_lock); | 3199 | spin_lock(&cpu_buffer->reader_lock); |
3198 | 3200 | ||
3199 | event = rb_buffer_peek(buffer, cpu, ts); | 3201 | event = rb_buffer_peek(buffer, cpu, ts); |
3200 | if (!event) | 3202 | if (event) |
3201 | goto out_unlock; | 3203 | rb_advance_reader(cpu_buffer); |
3202 | |||
3203 | rb_advance_reader(cpu_buffer); | ||
3204 | 3204 | ||
3205 | out_unlock: | ||
3206 | if (dolock) | 3205 | if (dolock) |
3207 | spin_unlock(&cpu_buffer->reader_lock); | 3206 | spin_unlock(&cpu_buffer->reader_lock); |
3208 | local_irq_restore(flags); | 3207 | local_irq_restore(flags); |