From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759823AbcDFHI4 (ORCPT ); Wed, 6 Apr 2016 03:08:56 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57890 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbcDFHIz (ORCPT ); Wed, 6 Apr 2016 03:08:55 -0400 Date: Wed, 6 Apr 2016 00:08:42 -0700 From: tip-bot for Adrian Hunter Message-ID: Cc: linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com, tglx@linutronix.de, acme@redhat.com, mingo@kernel.org, jolsa@redhat.com, adrian.hunter@intel.com Reply-To: eranian@google.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com, jolsa@redhat.com, mingo@kernel.org, acme@redhat.com, adrian.hunter@intel.com In-Reply-To: <1457426333-30260-1-git-send-email-adrian.hunter@intel.com> References: <1457426333-30260-1-git-send-email-adrian.hunter@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf intel-pt/bts: Define JITDUMP_USE_ARCH_TIMESTAMP Git-Commit-ID: bd0c7a54219cc3745ce7f36970d8e5ffb3f8d80e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: bd0c7a54219cc3745ce7f36970d8e5ffb3f8d80e Gitweb: http://git.kernel.org/tip/bd0c7a54219cc3745ce7f36970d8e5ffb3f8d80e Author: Adrian Hunter AuthorDate: Tue, 8 Mar 2016 10:38:53 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 1 Apr 2016 18:46:24 -0300 perf intel-pt/bts: Define JITDUMP_USE_ARCH_TIMESTAMP For Intel PT / BTS, define the environment variable that selects TSC timestamps in the jitdump file. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1457426333-30260-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/x86/util/intel-bts.c | 5 +++++ tools/perf/arch/x86/util/intel-pt.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/util/intel-bts.c index d66f9ad..7dc3063 100644 --- a/tools/perf/arch/x86/util/intel-bts.c +++ b/tools/perf/arch/x86/util/intel-bts.c @@ -438,6 +438,11 @@ struct auxtrace_record *intel_bts_recording_init(int *err) if (!intel_bts_pmu) return NULL; + if (setenv("JITDUMP_USE_ARCH_TIMESTAMP", "1", 1)) { + *err = -errno; + return NULL; + } + btsr = zalloc(sizeof(struct intel_bts_recording)); if (!btsr) { *err = -ENOMEM; diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index a339517..a07b960 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -1027,6 +1027,11 @@ struct auxtrace_record *intel_pt_recording_init(int *err) if (!intel_pt_pmu) return NULL; + if (setenv("JITDUMP_USE_ARCH_TIMESTAMP", "1", 1)) { + *err = -errno; + return NULL; + } + ptr = zalloc(sizeof(struct intel_pt_recording)); if (!ptr) { *err = -ENOMEM;