diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-10-18 09:04:02 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-10-18 09:04:02 +0200 |
commit | 3b10ea7f922b538ba5dcb3d979a6b6b4d07daae2 (patch) | |
tree | e7d8e31708d8b553973154dbe1e8b9b7d9ad81c3 /tools/perf/util | |
parent | 691286b5561aab2e1b00119bc328598c01250548 (diff) | |
parent | e8564b710c6df2c3aeb56c507c22f4bcfa4c0b2d (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
* Add period data column and make it default in 'perf script' (Jiri Olsa)
Infrastructure changes:
* Move exit stuff from perf_evsel__delete to perf_evsel__exit, delete
should be just a front end for exit + free (Arnaldo Carvalho de Melo)
* Add missing 'struct option' forward declaration (Arnaldo Carvalho de Melo)
* No need to drag util/cgroup.h into evsel.h (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/evlist.h | 2 | ||||
-rw-r--r-- | tools/perf/util/evsel.c | 11 | ||||
-rw-r--r-- | tools/perf/util/evsel.h | 3 |
3 files changed, 10 insertions, 6 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index bd312b01e87..649b0c59728 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -117,6 +117,8 @@ int perf_evlist__prepare_workload(struct perf_evlist *evlist, void *ucontext)); int perf_evlist__start_workload(struct perf_evlist *evlist); +struct option; + int perf_evlist__parse_mmap_pages(const struct option *opt, const char *str, int unset); diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index d1ecde0fd56..2f9e68025ed 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -16,6 +16,7 @@ #include <sys/resource.h> #include "asm/bug.h" #include "callchain.h" +#include "cgroup.h" #include "evsel.h" #include "evlist.h" #include "util.h" @@ -850,17 +851,17 @@ void perf_evsel__exit(struct perf_evsel *evsel) assert(list_empty(&evsel->node)); perf_evsel__free_fd(evsel); perf_evsel__free_id(evsel); + close_cgroup(evsel->cgrp); + zfree(&evsel->group_name); + if (evsel->tp_format) + pevent_free_format(evsel->tp_format); + zfree(&evsel->name); perf_evsel__object.fini(evsel); } void perf_evsel__delete(struct perf_evsel *evsel) { perf_evsel__exit(evsel); - close_cgroup(evsel->cgrp); - zfree(&evsel->group_name); - if (evsel->tp_format) - pevent_free_format(evsel->tp_format); - zfree(&evsel->name); free(evsel); } diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 1d5c754aebc..163c5604e5d 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -7,7 +7,6 @@ #include <linux/perf_event.h> #include <linux/types.h> #include "xyarray.h" -#include "cgroup.h" #include "symbol.h" struct perf_counts_values { @@ -42,6 +41,8 @@ struct perf_sample_id { u64 period; }; +struct cgroup_sel; + /** struct perf_evsel - event selector * * @name - Can be set to retain the original event name passed by the user, |