Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754390AbbKLMFz (ORCPT ); Thu, 12 Nov 2015 07:05:55 -0500 Received: from mgwkm03.jp.fujitsu.com ([202.219.69.170]:56175 "EHLO mgwkm03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754026AbbKLMFy (ORCPT ); Thu, 12 Nov 2015 07:05:54 -0500 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.2.3 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20140219-2 Subject: Re: [PATCH v2 0/2] Stop Intel Processor Trace logging on panic To: , , , , , , References: <1446614553-6072-1-git-send-email-indou.takao@jp.fujitsu.com> CC: , From: Takao Indoh Message-ID: <56448077.8090706@jp.fujitsu.com> Date: Thu, 12 Nov 2015 21:05:11 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1446614553-6072-1-git-send-email-indou.takao@jp.fujitsu.com> Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2939 Lines: 76 Ping, any comments on these patches? Thanks, Takao Indoh On 2015/11/04 14:22, Takao Indoh wrote: > Hi all, > > These patch series provide a feature to stop Intel Processor Trace > (Intel PT) logging and save its registers in the memory on panic. > > Intel PT is a new feature of Intel CPU "Broadwell", it captures > information about program execution flow. Here is a article about Intel > PT. > https://software.intel.com/en-us/blogs/2013/09/18/processor-tracing > > Once Intel PT is enabled, the events which change program flow, like > branch instructions, exceptions, interruptions, traps and so on are > logged in the memory. This is very useful for debugging because we can > know the detailed behavior of software. > > When kernel panic occurs while you are running a perf command with Intel > PT (with -e intel_pt// option), these patches disable Intel PT and save > its registers in the memory. After crash dump is captured by kdump, you > can retrieve Intel PT log buffer from vmcore and investigate kernel > behavior. I have not made a tool yet to salvage Intel PT log buffer from > vmcore, but I'll do once these patches are accepted. > > changelog: > v2: > - Define function in intel_pt.h with static inline > > v1: > https://lkml.org/lkml/2015/10/28/136 > > > Background: > These patches are a part of patch series I posted before, the original > discussion is bellow. > > x86: Intel Processor Trace Logger > v1: https://lkml.org/lkml/2015/7/29/6 > v2: https://lkml.org/lkml/2015/9/8/24 > > The purpose of the original patches is introducing in-kernel logger > using Intel PT. To implement it I need to add some APIs to control perf > counter and ring buffer in kernel. Alexander Shishkin is working on such > APIs for his work to make use of Intel PT for process core dump. Apart > from such APIs, the feature to save Intel PT registers on panic is > helpful for normal perf command user as I described above, therefore I > separate the feature from original patches. > > Takao Indoh (2): > perf/x86/intel/pt: Add interface to stop Intel PT logging > x86: Stop Intel PT before kdump starts > > arch/x86/include/asm/intel_pt.h | 10 ++++++++++ > arch/x86/kernel/cpu/perf_event_intel_pt.c | 9 +++++++++ > arch/x86/kernel/crash.c | 11 +++++++++++ > 3 files changed, 30 insertions(+), 0 deletions(-) > create mode 100644 arch/x86/include/asm/intel_pt.h > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/