linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 11/27] perf tests time-to-tsc: No need to disable an event before deleting it
Date: Thu, 23 Jun 2016 18:23:58 -0300	[thread overview]
Message-ID: <1466717054-31048-12-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1466717054-31048-1-git-send-email-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Because at the destructor we will call close() and that will do the
disable. And we destructors can accept NULL, just like free(), so no
need to check it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-i98mcyfkkjh5qp62dle27ac1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/x86/tests/perf-time-to-tsc.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/perf/arch/x86/tests/perf-time-to-tsc.c b/tools/perf/arch/x86/tests/perf-time-to-tsc.c
index d4aa567a29c4..5c76cc83186a 100644
--- a/tools/perf/arch/x86/tests/perf-time-to-tsc.c
+++ b/tools/perf/arch/x86/tests/perf-time-to-tsc.c
@@ -154,10 +154,6 @@ next_event:
 	err = 0;
 
 out_err:
-	if (evlist) {
-		perf_evlist__disable(evlist);
-		perf_evlist__delete(evlist);
-	}
-
+	perf_evlist__delete(evlist);
 	return err;
 }
-- 
2.5.5

  parent reply	other threads:[~2016-06-23 21:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 21:23 [GIT PULL 00/27] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 01/27] perf script stackcollapse: Remove reference to the perl interpreter Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 02/27] perf hists browser: Move hist_browser into header file Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 03/27] perf hists browser: Make (new|delete|run) public Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 04/27] perf hists browser: Introduce struct hist_browser title callback Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 05/27] perf hists browser: Move horizontal scroll init to new() Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 06/27] perf hists browser: Introduce perf_evsel_browser constructor Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 07/27] perf hists browser: Introduce init() Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 08/27] perf hists: Enlarge pid sort entry size Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 09/27] perf evlist: Destructors should accept NULL Arnaldo Carvalho de Melo
2016-06-23 21:23 ` [PATCH 10/27] perf session: " Arnaldo Carvalho de Melo
2016-06-23 21:23 ` Arnaldo Carvalho de Melo [this message]
2016-06-23 21:23 ` [PATCH 12/27] perf machine: " Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 13/27] perf tools: Let python use correct gcc for build_ext Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 14/27] perf config: Move config declarations from util/cache.h to util/config.h Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 15/27] perf tools: Find right DSO taking into account if binary is 32 or 64-bit Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 16/27] perf unwind: Change macro names of perf register Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 17/27] perf unwind: Fix wrongly used regs for x86_32 unwind Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 18/27] perf unwind: Fix wrongly used regs for aarch64 unwind Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 19/27] perf evlist: Rename for_each() macros to for_each_entry() Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 20/27] perf tools: Rename strlist_for_each() " Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 21/27] perf rb_resort: Rename for_each() " Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 22/27] perf intlist: " Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 23/27] perf script: Print sample flags more nicely Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 24/27] perf auxtrace: Add option to feed branches to the thread stack Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 25/27] perf script: Add callindent option Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 26/27] perf config: Introduce new init() and exit() Arnaldo Carvalho de Melo
2016-06-23 21:24 ` [PATCH 27/27] perf config: Reimplement show_config() using config_set__for_each Arnaldo Carvalho de Melo
2016-06-26 10:43 ` [GIT PULL 00/27] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466717054-31048-12-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).