diff options
Diffstat (limited to 'tools/perf/util/intel-pt.c')
| -rw-r--r-- | tools/perf/util/intel-pt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 56a9e439f5f8..d83439c8c7b0 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -1830,9 +1830,9 @@ static int intel_pt_synth_branch_sample(struct intel_pt_queue *ptq) ptq->last_br_cyc_cnt = ptq->ipc_cyc_cnt; } - perf_sample__exit(&sample); ret = intel_pt_deliver_synth_event(pt, event, &sample, pt->branches_sample_type); + perf_sample__exit(&sample); return ret; } @@ -1967,6 +1967,7 @@ static int intel_pt_synth_ptwrite_sample(struct intel_pt_queue *ptq) union perf_event *event = ptq->event_buf; struct perf_sample sample = { .ip = 0, }; struct perf_synth_intel_ptwrite raw; + int ret; if (intel_pt_skip_event(pt)) return 0; @@ -1983,8 +1984,9 @@ static int intel_pt_synth_ptwrite_sample(struct intel_pt_queue *ptq) sample.raw_size = perf_synth__raw_size(raw); sample.raw_data = perf_synth__raw_data(&raw); - return intel_pt_deliver_synth_event(pt, event, &sample, - pt->ptwrites_sample_type); + ret = intel_pt_deliver_synth_event(pt, event, &sample, pt->ptwrites_sample_type); + perf_sample__exit(&sample); + return ret; } static int intel_pt_synth_cbr_sample(struct intel_pt_queue *ptq) |
