提交 258ba6a5 编写于 作者: L Linus Torvalds

Merge branch 'perf-fixes-for-linus' of...

Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf, x86: Update/fix Intel Nehalem cache events
  perf, x86: P4 PMU - Don't forget to clear cpuc->active_mask on overflow
  x86, perf event: Turn off unstructured raw event access to offcore registers
  perf: Support Xeon E7's via the Westmere PMU driver
...@@ -586,8 +586,12 @@ static int x86_setup_perfctr(struct perf_event *event) ...@@ -586,8 +586,12 @@ static int x86_setup_perfctr(struct perf_event *event)
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
/*
* Do not allow config1 (extended registers) to propagate,
* there's no sane user-space generalization yet:
*/
if (attr->type == PERF_TYPE_RAW) if (attr->type == PERF_TYPE_RAW)
return x86_pmu_extra_regs(event->attr.config, event); return 0;
if (attr->type == PERF_TYPE_HW_CACHE) if (attr->type == PERF_TYPE_HW_CACHE)
return set_ext_hw_attr(hwc, event); return set_ext_hw_attr(hwc, event);
......
...@@ -391,12 +391,12 @@ static __initconst const u64 nehalem_hw_cache_event_ids ...@@ -391,12 +391,12 @@ static __initconst const u64 nehalem_hw_cache_event_ids
{ {
[ C(L1D) ] = { [ C(L1D) ] = {
[ C(OP_READ) ] = { [ C(OP_READ) ] = {
[ C(RESULT_ACCESS) ] = 0x0f40, /* L1D_CACHE_LD.MESI */ [ C(RESULT_ACCESS) ] = 0x010b, /* MEM_INST_RETIRED.LOADS */
[ C(RESULT_MISS) ] = 0x0140, /* L1D_CACHE_LD.I_STATE */ [ C(RESULT_MISS) ] = 0x0151, /* L1D.REPL */
}, },
[ C(OP_WRITE) ] = { [ C(OP_WRITE) ] = {
[ C(RESULT_ACCESS) ] = 0x0f41, /* L1D_CACHE_ST.MESI */ [ C(RESULT_ACCESS) ] = 0x020b, /* MEM_INST_RETURED.STORES */
[ C(RESULT_MISS) ] = 0x0141, /* L1D_CACHE_ST.I_STATE */ [ C(RESULT_MISS) ] = 0x0251, /* L1D.M_REPL */
}, },
[ C(OP_PREFETCH) ] = { [ C(OP_PREFETCH) ] = {
[ C(RESULT_ACCESS) ] = 0x014e, /* L1D_PREFETCH.REQUESTS */ [ C(RESULT_ACCESS) ] = 0x014e, /* L1D_PREFETCH.REQUESTS */
...@@ -1425,6 +1425,7 @@ static __init int intel_pmu_init(void) ...@@ -1425,6 +1425,7 @@ static __init int intel_pmu_init(void)
case 37: /* 32 nm nehalem, "Clarkdale" */ case 37: /* 32 nm nehalem, "Clarkdale" */
case 44: /* 32 nm nehalem, "Gulftown" */ case 44: /* 32 nm nehalem, "Gulftown" */
case 47: /* 32 nm Xeon E7 */
memcpy(hw_cache_event_ids, westmere_hw_cache_event_ids, memcpy(hw_cache_event_ids, westmere_hw_cache_event_ids,
sizeof(hw_cache_event_ids)); sizeof(hw_cache_event_ids));
memcpy(hw_cache_extra_regs, nehalem_hw_cache_extra_regs, memcpy(hw_cache_extra_regs, nehalem_hw_cache_extra_regs,
......
...@@ -947,7 +947,7 @@ static int p4_pmu_handle_irq(struct pt_regs *regs) ...@@ -947,7 +947,7 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
if (!x86_perf_event_set_period(event)) if (!x86_perf_event_set_period(event))
continue; continue;
if (perf_event_overflow(event, 1, &data, regs)) if (perf_event_overflow(event, 1, &data, regs))
p4_pmu_disable_event(event); x86_pmu_stop(event, 0);
} }
if (handled) { if (handled) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册