Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1257785

[PATCH 0/2] Stop Intel Processor Trace logging on panic

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Takao Indoh <indou.takao@jp.fujitsu.com>
Newsgroups linux.kernel
Subject [PATCH 0/2] Stop Intel Processor Trace logging on panic
Date Wed, 28 Oct 2015 09:30:03 +0100
Message-ID <qouhk-af-7@gated-at.bofh.it> (permalink)
X-Original-To Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Arnaldo Carvalho de Melo <acme@kernel.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Vivek Goyal <vgoyal@redhat.com>
X-Securitypolicycheck OK by SHieldMailChecker v2.2.3
X-Shieldmailcheckerpolicyversion FJ-ISEC-20140219-2
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 robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 54
Organization linux.* mail to news gateway
X-Original-Cc <linux-kernel@vger.kernel.org>, <x86@kernel.org>
X-Original-Date Wed, 28 Oct 2015 17:25:46 +0900
X-Original-Message-ID <1446020748-5436-1-git-send-email-indou.takao@jp.fujitsu.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1257785

Show key headers only | View raw


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.

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/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] Stop Intel Processor Trace logging on panic Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-10-28 09:30 +0100
  [PATCH 1/2] perf/x86/intel/pt: Add interface to stop Intel PT logging Takao Indoh <indou.takao@jp.fujitsu.com> - 2015-10-28 09:40 +0100

csiph-web