aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2016-03-08 03:38:53 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-04-01 17:46:24 -0400
commitbd0c7a54219cc3745ce7f36970d8e5ffb3f8d80e (patch)
treeae9beb8c59a8f6864b56a405f5802ae540034eca
parent2a28e23049af99e1c810111ef5e56455cafeda45 (diff)
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 <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1457426333-30260-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/arch/x86/util/intel-bts.c5
-rw-r--r--tools/perf/arch/x86/util/intel-pt.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/util/intel-bts.c
index d66f9ad4df2e..7dc30637cf66 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)
438 if (!intel_bts_pmu) 438 if (!intel_bts_pmu)
439 return NULL; 439 return NULL;
440 440
441 if (setenv("JITDUMP_USE_ARCH_TIMESTAMP", "1", 1)) {
442 *err = -errno;
443 return NULL;
444 }
445
441 btsr = zalloc(sizeof(struct intel_bts_recording)); 446 btsr = zalloc(sizeof(struct intel_bts_recording));
442 if (!btsr) { 447 if (!btsr) {
443 *err = -ENOMEM; 448 *err = -ENOMEM;
diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
index a3395179c9ee..a07b9605e93b 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)
1027 if (!intel_pt_pmu) 1027 if (!intel_pt_pmu)
1028 return NULL; 1028 return NULL;
1029 1029
1030 if (setenv("JITDUMP_USE_ARCH_TIMESTAMP", "1", 1)) {
1031 *err = -errno;
1032 return NULL;
1033 }
1034
1030 ptr = zalloc(sizeof(struct intel_pt_recording)); 1035 ptr = zalloc(sizeof(struct intel_pt_recording));
1031 if (!ptr) { 1036 if (!ptr) {
1032 *err = -ENOMEM; 1037 *err = -ENOMEM;