perf intel-pt/bts: Define JITDUMP_USE_ARCH_TIMESTAMP
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 8 Mar 2016 08:38:53 +0000 (10:38 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 1 Apr 2016 21:46:24 +0000 (18:46 -0300)
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>
tools/perf/arch/x86/util/intel-bts.c
tools/perf/arch/x86/util/intel-pt.c

index d66f9ad4df2ea5da6eca22cae351a842d1143508..7dc30637cf66f4957dd6608a9b3a145a0e81a487 100644 (file)
@@ -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;
index a3395179c9eebd5fcd39aa4796a0dc3d495f4b5d..a07b9605e93b3f1c7c746f5296229c20f8f3767a 100644 (file)
@@ -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;