aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-10-18 03:04:02 -0400
committerIngo Molnar <mingo@kernel.org>2014-10-18 03:04:02 -0400
commit3b10ea7f922b538ba5dcb3d979a6b6b4d07daae2 (patch)
treee7d8e31708d8b553973154dbe1e8b9b7d9ad81c3 /tools/perf/util
parent691286b5561aab2e1b00119bc328598c01250548 (diff)
parente8564b710c6df2c3aeb56c507c22f4bcfa4c0b2d (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.h2
-rw-r--r--tools/perf/util/evsel.c11
-rw-r--r--tools/perf/util/evsel.h3
3 files changed, 10 insertions, 6 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index bd312b01e876..649b0c597283 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,
117 void *ucontext)); 117 void *ucontext));
118int perf_evlist__start_workload(struct perf_evlist *evlist); 118int perf_evlist__start_workload(struct perf_evlist *evlist);
119 119
120struct option;
121
120int perf_evlist__parse_mmap_pages(const struct option *opt, 122int perf_evlist__parse_mmap_pages(const struct option *opt,
121 const char *str, 123 const char *str,
122 int unset); 124 int unset);
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index d1ecde0fd56c..2f9e68025ede 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -16,6 +16,7 @@
16#include <sys/resource.h> 16#include <sys/resource.h>
17#include "asm/bug.h" 17#include "asm/bug.h"
18#include "callchain.h" 18#include "callchain.h"
19#include "cgroup.h"
19#include "evsel.h" 20#include "evsel.h"
20#include "evlist.h" 21#include "evlist.h"
21#include "util.h" 22#include "util.h"
@@ -850,17 +851,17 @@ void perf_evsel__exit(struct perf_evsel *evsel)
850 assert(list_empty(&evsel->node)); 851 assert(list_empty(&evsel->node));
851 perf_evsel__free_fd(evsel); 852 perf_evsel__free_fd(evsel);
852 perf_evsel__free_id(evsel); 853 perf_evsel__free_id(evsel);
854 close_cgroup(evsel->cgrp);
855 zfree(&evsel->group_name);
856 if (evsel->tp_format)
857 pevent_free_format(evsel->tp_format);
858 zfree(&evsel->name);
853 perf_evsel__object.fini(evsel); 859 perf_evsel__object.fini(evsel);
854} 860}
855 861
856void perf_evsel__delete(struct perf_evsel *evsel) 862void perf_evsel__delete(struct perf_evsel *evsel)
857{ 863{
858 perf_evsel__exit(evsel); 864 perf_evsel__exit(evsel);
859 close_cgroup(evsel->cgrp);
860 zfree(&evsel->group_name);
861 if (evsel->tp_format)
862 pevent_free_format(evsel->tp_format);
863 zfree(&evsel->name);
864 free(evsel); 865 free(evsel);
865} 866}
866 867
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 1d5c754aebc4..163c5604e5d1 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -7,7 +7,6 @@
7#include <linux/perf_event.h> 7#include <linux/perf_event.h>
8#include <linux/types.h> 8#include <linux/types.h>
9#include "xyarray.h" 9#include "xyarray.h"
10#include "cgroup.h"
11#include "symbol.h" 10#include "symbol.h"
12 11
13struct perf_counts_values { 12struct perf_counts_values {
@@ -42,6 +41,8 @@ struct perf_sample_id {
42 u64 period; 41 u64 period;
43}; 42};
44 43
44struct cgroup_sel;
45
45/** struct perf_evsel - event selector 46/** struct perf_evsel - event selector
46 * 47 *
47 * @name - Can be set to retain the original event name passed by the user, 48 * @name - Can be set to retain the original event name passed by the user,