Эх сурвалжийг харах

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>
Adrian Hunter 9 жил өмнө
parent
commit
bd0c7a5421

+ 5 - 0
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)
 	if (!intel_bts_pmu)
 		return NULL;
 		return NULL;
 
 
+	if (setenv("JITDUMP_USE_ARCH_TIMESTAMP", "1", 1)) {
+		*err = -errno;
+		return NULL;
+	}
+
 	btsr = zalloc(sizeof(struct intel_bts_recording));
 	btsr = zalloc(sizeof(struct intel_bts_recording));
 	if (!btsr) {
 	if (!btsr) {
 		*err = -ENOMEM;
 		*err = -ENOMEM;

+ 5 - 0
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)
 	if (!intel_pt_pmu)
 		return NULL;
 		return NULL;
 
 
+	if (setenv("JITDUMP_USE_ARCH_TIMESTAMP", "1", 1)) {
+		*err = -errno;
+		return NULL;
+	}
+
 	ptr = zalloc(sizeof(struct intel_pt_recording));
 	ptr = zalloc(sizeof(struct intel_pt_recording));
 	if (!ptr) {
 	if (!ptr) {
 		*err = -ENOMEM;
 		*err = -ENOMEM;