diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-10 12:17:54 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-10 12:17:54 +0300 |
commit | 5006921837b7c46d2352f850fd3e4d5370221081 (patch) | |
tree | ff41794ba5444343620314859a41c5ef7b374fef /arch/x86/events/intel/ds.c | |
parent | 14520d630adb4314722dd57ccb689ffdc6a31383 (diff) | |
parent | 8ef9b8455a2a3049efa9e46e8a6402b972a3eb41 (diff) | |
download | linux-5006921837b7c46d2352f850fd3e4d5370221081.tar.xz |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/events/intel/ds.c')
-rw-r--r-- | arch/x86/events/intel/ds.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index e0288d555367..0319311dbdbb 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c @@ -1312,18 +1312,18 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs) struct pebs_record_nhm *p = at; u64 pebs_status; - /* PEBS v3 has accurate status bits */ + pebs_status = p->status & cpuc->pebs_enabled; + pebs_status &= (1ULL << x86_pmu.max_pebs_events) - 1; + + /* PEBS v3 has more accurate status bits */ if (x86_pmu.intel_cap.pebs_format >= 3) { - for_each_set_bit(bit, (unsigned long *)&p->status, - MAX_PEBS_EVENTS) + for_each_set_bit(bit, (unsigned long *)&pebs_status, + x86_pmu.max_pebs_events) counts[bit]++; continue; } - pebs_status = p->status & cpuc->pebs_enabled; - pebs_status &= (1ULL << x86_pmu.max_pebs_events) - 1; - /* * On some CPUs the PEBS status can be zero when PEBS is * racing with clearing of GLOBAL_STATUS. @@ -1371,8 +1371,11 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs) continue; event = cpuc->events[bit]; - WARN_ON_ONCE(!event); - WARN_ON_ONCE(!event->attr.precise_ip); + if (WARN_ON_ONCE(!event)) + continue; + + if (WARN_ON_ONCE(!event->attr.precise_ip)) + continue; /* log dropped samples number */ if (error[bit]) |