perf tests time-to-tsc: No need to disable an event before deleting it
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 61b3f66a3f99bb8a6a5145b1c2bd7eb98bf64748 Gitweb: http://git.kernel.org/tip/61b3f66a3f99bb8a6a5145b1c2bd7eb98bf64748 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Wed, 22 Jun 2016 10:10:52 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 22 Jun 2016 10:10:52 -0300
perf tests time-to-tsc: No need to disable an event before deleting it
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 <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Jiri Olsa <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/x86/tests/perf-time-to-tsc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
tools/perf/arch/x86/tests/perf-time-to-tsc.c +1 -5
@@ -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; }