Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146165
b: refs/heads/master
c: 88eb012
h: refs/heads/master
i:
  146163: 190839e
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed May 12, 2009
1 parent 227db9e commit c1017dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 0f0c85fc80adbbd2265d89867d743f929d516805
refs/heads/master: 88eb0125362f2ab272cbaf84252cf101ddc2dec9
13 changes: 9 additions & 4 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,13 +454,18 @@ struct ring_buffer_iter {
/* Up this if you want to test the TIME_EXTENTS and normalization */
#define DEBUG_SHIFT 0

static inline u64 rb_time_stamp(struct ring_buffer *buffer, int cpu)
{
/* shift to debug/test normalization and TIME_EXTENTS */
return buffer->clock() << DEBUG_SHIFT;
}

u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu)
{
u64 time;

preempt_disable_notrace();
/* shift to debug/test normalization and TIME_EXTENTS */
time = buffer->clock() << DEBUG_SHIFT;
time = rb_time_stamp(buffer, cpu);
preempt_enable_no_resched_notrace();

return time;
Expand Down Expand Up @@ -1247,7 +1252,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
cpu_buffer->tail_page = next_page;

/* reread the time stamp */
*ts = ring_buffer_time_stamp(buffer, cpu_buffer->cpu);
*ts = rb_time_stamp(buffer, cpu_buffer->cpu);
cpu_buffer->tail_page->page->time_stamp = *ts;
}

Expand Down Expand Up @@ -1413,7 +1418,7 @@ rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer,
if (RB_WARN_ON(cpu_buffer, ++nr_loops > 1000))
return NULL;

ts = ring_buffer_time_stamp(cpu_buffer->buffer, cpu_buffer->cpu);
ts = rb_time_stamp(cpu_buffer->buffer, cpu_buffer->cpu);

/*
* Only the first commit can update the timestamp.
Expand Down

0 comments on commit c1017dd

Please sign in to comment.