diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/ring_buffer.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index c8ce6bde7fa4..3af77cd47f21 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -2008,14 +2008,14 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer, | |||
2008 | 2008 | ||
2009 | static int | 2009 | static int |
2010 | rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer, | 2010 | rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer, |
2011 | u64 ts, u64 *delta) | 2011 | u64 ts, u64 delta) |
2012 | { | 2012 | { |
2013 | struct ring_buffer_event *event; | 2013 | struct ring_buffer_event *event; |
2014 | int ret; | 2014 | int ret; |
2015 | 2015 | ||
2016 | WARN_ONCE(*delta > (1ULL << 59), | 2016 | WARN_ONCE(delta > (1ULL << 59), |
2017 | KERN_WARNING "Delta way too big! %llu ts=%llu write stamp = %llu\n", | 2017 | KERN_WARNING "Delta way too big! %llu ts=%llu write stamp = %llu\n", |
2018 | (unsigned long long)*delta, | 2018 | (unsigned long long)delta, |
2019 | (unsigned long long)ts, | 2019 | (unsigned long long)ts, |
2020 | (unsigned long long)cpu_buffer->write_stamp); | 2020 | (unsigned long long)cpu_buffer->write_stamp); |
2021 | 2021 | ||
@@ -2041,8 +2041,8 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer, | |||
2041 | * and if we can't just make it zero. | 2041 | * and if we can't just make it zero. |
2042 | */ | 2042 | */ |
2043 | if (rb_event_index(event)) { | 2043 | if (rb_event_index(event)) { |
2044 | event->time_delta = *delta & TS_MASK; | 2044 | event->time_delta = delta & TS_MASK; |
2045 | event->array[0] = *delta >> TS_SHIFT; | 2045 | event->array[0] = delta >> TS_SHIFT; |
2046 | } else { | 2046 | } else { |
2047 | /* try to discard, since we do not need this */ | 2047 | /* try to discard, since we do not need this */ |
2048 | if (!rb_try_to_discard(cpu_buffer, event)) { | 2048 | if (!rb_try_to_discard(cpu_buffer, event)) { |
@@ -2064,8 +2064,6 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer, | |||
2064 | ret = 0; | 2064 | ret = 0; |
2065 | } | 2065 | } |
2066 | 2066 | ||
2067 | *delta = 0; | ||
2068 | |||
2069 | return ret; | 2067 | return ret; |
2070 | } | 2068 | } |
2071 | 2069 | ||
@@ -2175,7 +2173,9 @@ rb_reserve_next_event(struct ring_buffer *buffer, | |||
2175 | delta = diff; | 2173 | delta = diff; |
2176 | if (unlikely(test_time_stamp(delta))) { | 2174 | if (unlikely(test_time_stamp(delta))) { |
2177 | 2175 | ||
2178 | commit = rb_add_time_stamp(cpu_buffer, ts, &delta); | 2176 | commit = rb_add_time_stamp(cpu_buffer, ts, delta); |
2177 | delta = 0; | ||
2178 | |||
2179 | if (commit == -EBUSY) | 2179 | if (commit == -EBUSY) |
2180 | goto out_fail; | 2180 | goto out_fail; |
2181 | 2181 | ||