Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199096
b: refs/heads/master
c: 6d1acfd
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 18, 2010
1 parent 7ff3109 commit 59a48cb
Show file tree
Hide file tree
Showing 3 changed files with 4 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: fa5881514ef9c9bcb29319aad85cf2d8889d91f1
refs/heads/master: 6d1acfd5c6bfd5231c13a8f2858d7f2afbaa1b62
1 change: 1 addition & 0 deletions trunk/include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ struct perf_output_handle {
struct perf_mmap_data *data;
unsigned long head;
unsigned long offset;
unsigned long wakeup;
int nmi;
int sample;
};
Expand Down
3 changes: 2 additions & 1 deletion trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2917,6 +2917,7 @@ static void perf_output_get_handle(struct perf_output_handle *handle)

preempt_disable();
local_inc(&data->nest);
handle->wakeup = local_read(&data->wakeup);
}

static void perf_output_put_handle(struct perf_output_handle *handle)
Expand Down Expand Up @@ -2950,7 +2951,7 @@ static void perf_output_put_handle(struct perf_output_handle *handle)
goto again;
}

if (local_xchg(&data->wakeup, 0))
if (handle->wakeup != local_read(&data->wakeup))
perf_output_wakeup(handle);

preempt_enable();
Expand Down

0 comments on commit 59a48cb

Please sign in to comment.