perf_counter: kerneltop: simplify data_head read
Now that the kernel side changed, match up again. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Paul Mackerras <paulus@samba.org> Orig-LKML-Reference: <20090330171023.327144324@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
38ff667b32
commit
1955643902
@ -1125,22 +1125,10 @@ struct mmap_data {
|
|||||||
static unsigned int mmap_read_head(struct mmap_data *md)
|
static unsigned int mmap_read_head(struct mmap_data *md)
|
||||||
{
|
{
|
||||||
struct perf_counter_mmap_page *pc = md->base;
|
struct perf_counter_mmap_page *pc = md->base;
|
||||||
unsigned int seq, head;
|
int head;
|
||||||
|
|
||||||
repeat:
|
|
||||||
rmb();
|
|
||||||
seq = pc->lock;
|
|
||||||
|
|
||||||
if (unlikely(seq & 1)) {
|
|
||||||
cpu_relax();
|
|
||||||
goto repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
head = pc->data_head;
|
head = pc->data_head;
|
||||||
|
|
||||||
rmb();
|
rmb();
|
||||||
if (pc->lock != seq)
|
|
||||||
goto repeat;
|
|
||||||
|
|
||||||
return head;
|
return head;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user