perf evsel: Delete the event selectors at exit
Freeing all the possibly allocated resources, reducing complexity on each tool exit path. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
1e7972cc5c
commit
70d544d057
6 changed files with 16 additions and 8 deletions
|
@ -1495,10 +1495,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __used)
|
|||
|
||||
status = __cmd_top();
|
||||
out_free_fd:
|
||||
list_for_each_entry(pos, &evsel_list, node) {
|
||||
perf_evsel__free_fd(pos);
|
||||
list_for_each_entry(pos, &evsel_list, node)
|
||||
perf_evsel__free_mmap(pos);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue