aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/arch/x86/util/intel-pt.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-09-08 15:35:44 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-09-08 15:35:44 +0200
commit6f90f1d1d2d853b2745afdd83800b170996fab50 (patch)
tree8d61cbc70dbda0d025c11fe6228bce678b1b1b30 /tools/perf/arch/x86/util/intel-pt.c
parent411b44ba80ab0023383fe3f377e903cb0cb7d8bb (diff)
parentb0eb91ae630a4f2771790e306bb4df323127a397 (diff)
Merge tag 'kvm-s390-next-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
KVM: s390: features and fixes for 4.9 - lazy enablement of runtime instrumentation - up to 255 CPUs for nested guests - rework of machine check deliver - cleanups/fixes
Diffstat (limited to 'tools/perf/arch/x86/util/intel-pt.c')
-rw-r--r--tools/perf/arch/x86/util/intel-pt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
index fb51457ba338..a2412e9d883b 100644
--- a/tools/perf/arch/x86/util/intel-pt.c
+++ b/tools/perf/arch/x86/util/intel-pt.c
@@ -501,7 +501,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
struct intel_pt_recording *ptr =
container_of(itr, struct intel_pt_recording, itr);
struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu;
- bool have_timing_info;
+ bool have_timing_info, need_immediate = false;
struct perf_evsel *evsel, *intel_pt_evsel = NULL;
const struct cpu_map *cpus = evlist->cpus;
bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
@@ -655,6 +655,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
ptr->have_sched_switch = 3;
} else {
opts->record_switch_events = true;
+ need_immediate = true;
if (cpu_wide)
ptr->have_sched_switch = 3;
else
@@ -700,6 +701,9 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
tracking_evsel->attr.freq = 0;
tracking_evsel->attr.sample_period = 1;
+ if (need_immediate)
+ tracking_evsel->immediate = true;
+
/* In per-cpu case, always need the time of mmap events etc */
if (!cpu_map__empty(cpus)) {
perf_evsel__set_sample_bit(tracking_evsel, TIME);