提交 19556439 编写于 作者: P Peter Zijlstra 提交者: Ingo Molnar

perf_counter: kerneltop: simplify data_head read

Now that the kernel side changed, match up again.
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: NPaul Mackerras <paulus@samba.org>
Orig-LKML-Reference: <20090330171023.327144324@chello.nl>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 38ff667b
......@@ -1125,22 +1125,10 @@ struct mmap_data {
static unsigned int mmap_read_head(struct mmap_data *md)
{
struct perf_counter_mmap_page *pc = md->base;
unsigned int seq, head;
repeat:
rmb();
seq = pc->lock;
if (unlikely(seq & 1)) {
cpu_relax();
goto repeat;
}
int head;
head = pc->data_head;
rmb();
if (pc->lock != seq)
goto repeat;
return head;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册