Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140855
b: refs/heads/master
c: 4f3640f
h: refs/heads/master
i:
  140853: 0675cc6
  140851: 2c59301
  140847: adc9016
v: v3
  • Loading branch information
Steven Rostedt committed Mar 5, 2009
1 parent 327042c commit c4afaf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: e543ad76914abec1acf6631604a4154cd7a2ca6b
refs/heads/master: 4f3640f8a358f2183a8c966f299eeb55ca523e06
6 changes: 5 additions & 1 deletion trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2461,6 +2461,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
unsigned long flags;
unsigned int commit;
unsigned int read;
u64 save_timestamp;
int ret = -1;

/*
Expand Down Expand Up @@ -2515,6 +2516,9 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
if (len < size)
goto out;

/* save the current timestamp, since the user will need it */
save_timestamp = cpu_buffer->read_stamp;

/* Need to copy one event at a time */
do {
memcpy(bpage->data + pos, rpage->data + rpos, size);
Expand All @@ -2531,7 +2535,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer,

/* update bpage */
local_set(&bpage->commit, pos);
bpage->time_stamp = rpage->time_stamp;
bpage->time_stamp = save_timestamp;

/* we copied everything to the beginning */
read = 0;
Expand Down

0 comments on commit c4afaf2

Please sign in to comment.