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

perf, x86: Fixup the precise_ip computation

In case we don't have PEBS, the LBR fixup doesn't make sense.
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: NStephane Eranian <eranian@google.com>
LKML-Reference: <20101019134808.354429461@chello.nl>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 65af94ba
...@@ -497,12 +497,13 @@ static int x86_pmu_hw_config(struct perf_event *event) ...@@ -497,12 +497,13 @@ static int x86_pmu_hw_config(struct perf_event *event)
int precise = 0; int precise = 0;
/* Support for constant skid */ /* Support for constant skid */
if (x86_pmu.pebs) if (x86_pmu.pebs) {
precise++; precise++;
/* Support for IP fixup */ /* Support for IP fixup */
if (x86_pmu.lbr_nr) if (x86_pmu.lbr_nr)
precise++; precise++;
}
if (event->attr.precise_ip > precise) if (event->attr.precise_ip > precise)
return -EOPNOTSUPP; return -EOPNOTSUPP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册