Commit 5da3b23b authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf intel-pt: Remove redundant initial_skip checks

'initial_skip' is checked inside the sample synthesis functions which means
it is actually being done twice for 'instructions' and 'transactions'
samples. Remove the redundant checks.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1495786658-18063-17-git-send-email-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 0a7c700d
...@@ -1322,18 +1322,14 @@ static int intel_pt_sample(struct intel_pt_queue *ptq) ...@@ -1322,18 +1322,14 @@ static int intel_pt_sample(struct intel_pt_queue *ptq)
ptq->have_sample = false; ptq->have_sample = false;
if (pt->sample_instructions && if (pt->sample_instructions &&
(state->type & INTEL_PT_INSTRUCTION) && (state->type & INTEL_PT_INSTRUCTION)) {
(!pt->synth_opts.initial_skip ||
pt->num_events++ >= pt->synth_opts.initial_skip)) {
err = intel_pt_synth_instruction_sample(ptq); err = intel_pt_synth_instruction_sample(ptq);
if (err) if (err)
return err; return err;
} }
if (pt->sample_transactions && if (pt->sample_transactions &&
(state->type & INTEL_PT_TRANSACTION) && (state->type & INTEL_PT_TRANSACTION)) {
(!pt->synth_opts.initial_skip ||
pt->num_events++ >= pt->synth_opts.initial_skip)) {
err = intel_pt_synth_transaction_sample(ptq); err = intel_pt_synth_transaction_sample(ptq);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment