From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754676AbbB0Rsi (ORCPT ); Fri, 27 Feb 2015 12:48:38 -0500 Received: from mga14.intel.com ([192.55.52.115]:50643 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752181AbbB0Rsg (ORCPT ); Fri, 27 Feb 2015 12:48:36 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,661,1418112000"; d="scan'208";a="672777205" From: Andi Kleen To: peterz@infradead.org Cc: linux-kernel@vger.kernel.org, eranian@google.com, Andi Kleen Subject: [PATCH 2/3] perf, x86: Dump DEBUGCTL in pmu dump Date: Fri, 27 Feb 2015 09:48:31 -0800 Message-Id: <1425059312-18217-3-git-send-email-andi@firstfloor.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1425059312-18217-1-git-send-email-andi@firstfloor.org> References: <1425059312-18217-1-git-send-email-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen LBRs and LBR freezing are controlled through DEBUGCTL. So dump the state of DEBUGCTL too when dumping the PMU state. Signed-off-by: Andi Kleen --- arch/x86/kernel/cpu/perf_event.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 01b6f3a..1579a46 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -1105,7 +1105,7 @@ static void x86_pmu_start(struct perf_event *event, int flags) void perf_event_print_debug(void) { u64 ctrl, status, overflow, pmc_ctrl, pmc_count, prev_left, fixed; - u64 pebs; + u64 pebs, debugctl; struct cpu_hw_events *cpuc; unsigned long flags; int cpu, idx; @@ -1131,6 +1131,10 @@ void perf_event_print_debug(void) pr_info("CPU#%d: overflow: %016llx\n", cpu, overflow); pr_info("CPU#%d: fixed: %016llx\n", cpu, fixed); pr_info("CPU#%d: pebs: %016llx\n", cpu, pebs); + if (x86_pmu.lbr_nr) { + rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl); + pr_info("CPU#%d: debugctl: %016llx\n", cpu, debugctl); + } } pr_info("CPU#%d: active: %016llx\n", cpu, *(u64 *)cpuc->active_mask); -- 1.9.3