From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756084AbcCCLyf (ORCPT ); Thu, 3 Mar 2016 06:54:35 -0500 Received: from mga01.intel.com ([192.55.52.88]:51430 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbcCCLyd (ORCPT ); Thu, 3 Mar 2016 06:54:33 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,532,1449561600"; d="scan'208";a="757374193" From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , linux-kernel@vger.kernel.org, Stephane Eranian Subject: [PATCH 0/8] perf tools: Add Intel PT support for jitdump Date: Thu, 3 Mar 2016 13:50:48 +0200 Message-Id: <1457005856-6143-1-git-send-email-adrian.hunter@intel.com> X-Mailer: git-send-email 1.9.1 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi In order to use Intel PT with jitdump, changes are needed because Intel PT uses TSC as a timestamp not the monotonic clock. These patches enable TSC to be used which allows the following using a simple HelloWorld java app: perf record -e intel_pt//u -o java.perf.data java -agentpath:/home/ahunter/git/linux-perf/tools/perf/jvmti/libjvmti.so HelloWorldApp perf inject -i java.perf.data --jit -o java.perf.data.jitted perf report -i java.perf.data.jitted perf script -i java.perf.data.jitted | less Note, there will be some decoder errors because not all the generated code is reported to the agent. Lazily, there is also an unrelated patch: perf tools: Use 64-bit shifts with (TSC) time conversion" Adrian Hunter (8): perf inject: Hit all DSOs for AUX data in JIT and other cases perf session: Simplify tool stubs perf tools: Add time conversion event perf jit: Let jit_process() return errors perf jit: Move clockid validation perf jit: Add support for using TSC as a timestamp perf intel-pt/bts: Define JITDUMP_USE_ARCH_TIMESTAMP perf tools: Use 64-bit shifts with (TSC) time conversion tools/perf/arch/x86/tests/rdpmc.c | 2 +- tools/perf/arch/x86/util/intel-bts.c | 5 +++ tools/perf/arch/x86/util/intel-pt.c | 5 +++ tools/perf/arch/x86/util/tsc.c | 31 +++++++++++++++++ tools/perf/builtin-inject.c | 53 ++++++++++++----------------- tools/perf/builtin-record.c | 15 +++++++++ tools/perf/jvmti/jvmti_agent.c | 43 ++++++++++++++++++++++-- tools/perf/util/event.c | 1 + tools/perf/util/event.h | 9 +++++ tools/perf/util/jitdump.c | 64 ++++++++++++++++++++++++++++++++---- tools/perf/util/jitdump.h | 3 ++ tools/perf/util/session.c | 46 ++++++++------------------ tools/perf/util/session.h | 1 + tools/perf/util/tool.h | 1 + tools/perf/util/tsc.c | 2 +- tools/perf/util/tsc.h | 10 ++++++ 16 files changed, 216 insertions(+), 75 deletions(-) Regards Adrian