From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbbIHFtr (ORCPT ); Tue, 8 Sep 2015 01:49:47 -0400 Received: from mgwym02.jp.fujitsu.com ([211.128.242.41]:12369 "EHLO mgwym02.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbbIHFto (ORCPT ); Tue, 8 Sep 2015 01:49:44 -0400 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.2.3 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20140219-2 From: Takao Indoh To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Arnaldo Carvalho de Melo , Alexander Shishkin , Vivek Goyal , Steven Rostedt CC: , Subject: [PATCH v2 0/4] x86: Intel Processor Trace Logger Date: Tue, 8 Sep 2015 14:49:20 +0900 Message-ID: <1441691364-5612-1-git-send-email-indou.takao@jp.fujitsu.com> X-Mailer: git-send-email 2.4.5 MIME-Version: 1.0 Content-Type: text/plain 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 Hi all, These patch series provide logging feature for Intel Processor Trace (Intel PT). 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. This patch creates log buffer for Intel PT and enable logging at boot time. When kernel panic occurs, we can get this log buffer from crashdump file by kdump, and reconstruct the flow that led to the panic. changelog: v2: - Reimplement using perf_event_create_kernel_counter v1: https://lkml.org/lkml/2015/7/29/6 Takao Indoh (4): perf/trace: Add function to find event type by name perf: Add function to enable perf events in kernel with ring buffer perf/x86/intel/pt: Add Intel PT logger x86: Stop Intel PT and save its registers when panic occurs arch/x86/Kconfig | 16 +++ arch/x86/include/asm/intel_pt_log.h | 13 ++ arch/x86/kernel/cpu/Makefile | 2 + arch/x86/kernel/cpu/intel_pt_log.c | 178 +++++++++++++++++++++++++++++ arch/x86/kernel/cpu/perf_event_intel_pt.c | 6 + arch/x86/kernel/crash.c | 9 ++ include/linux/perf_event.h | 10 ++ include/linux/trace_events.h | 2 + kernel/events/core.c | 70 +++++++++++- kernel/trace/trace_event_perf.c | 22 ++++ 10 files changed, 323 insertions(+), 5 deletions(-) create mode 100644 arch/x86/include/asm/intel_pt_log.h create mode 100644 arch/x86/kernel/cpu/intel_pt_log.c