From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752661AbdFUSb2 (ORCPT ); Wed, 21 Jun 2017 14:31:28 -0400 Received: from terminus.zytor.com ([65.50.211.136]:48003 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751688AbdFUSb0 (ORCPT ); Wed, 21 Jun 2017 14:31:26 -0400 Date: Wed, 21 Jun 2017 11:28:14 -0700 From: tip-bot for Adrian Hunter Message-ID: Cc: hpa@zytor.com, adrian.hunter@intel.com, acme@redhat.com, ak@linux.intel.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org Reply-To: linux-kernel@vger.kernel.org, ak@linux.intel.com, acme@redhat.com, hpa@zytor.com, adrian.hunter@intel.com, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <1495786658-18063-17-git-send-email-adrian.hunter@intel.com> References: <1495786658-18063-17-git-send-email-adrian.hunter@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf intel-pt: Remove redundant initial_skip checks Git-Commit-ID: 5da3b23b3b03d34fbb8cb9947c1a99ea77c2203f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5da3b23b3b03d34fbb8cb9947c1a99ea77c2203f Gitweb: http://git.kernel.org/tip/5da3b23b3b03d34fbb8cb9947c1a99ea77c2203f Author: Adrian Hunter AuthorDate: Fri, 26 May 2017 11:17:17 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 21 Jun 2017 11:35:51 -0300 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: Adrian Hunter Cc: Andi Kleen Link: http://lkml.kernel.org/r/1495786658-18063-17-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/intel-pt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 5c59b8c..3ae03f9 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -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;