]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
perf intel-pt: Remove redundant initial_skip checks
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 26 May 2017 08:17:17 +0000 (11:17 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 21 Jun 2017 14:35:51 +0000 (11:35 -0300)
'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: Adrian 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.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt.c

index 5c59b8c6a719262b04dd06cf6d7dac039eb55f2f..3ae03f92025336503ba7ebb328430b074253a146 100644 (file)
@@ -1322,18 +1322,14 @@ static int intel_pt_sample(struct intel_pt_queue *ptq)
        ptq->have_sample = false;
 
        if (pt->sample_instructions &&
-           (state->type & INTEL_PT_INSTRUCTION) &&
-           (!pt->synth_opts.initial_skip ||
-            pt->num_events++ >= pt->synth_opts.initial_skip)) {
+           (state->type & INTEL_PT_INSTRUCTION)) {
                err = intel_pt_synth_instruction_sample(ptq);
                if (err)
                        return err;
        }
 
        if (pt->sample_transactions &&
-           (state->type & INTEL_PT_TRANSACTION) &&
-           (!pt->synth_opts.initial_skip ||
-            pt->num_events++ >= pt->synth_opts.initial_skip)) {
+           (state->type & INTEL_PT_TRANSACTION)) {
                err = intel_pt_synth_transaction_sample(ptq);
                if (err)
                        return err;