Skip to contentSkip to conversation

perf evsel: No need to drag util/cgroup.h

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Oct 18, 2014 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  f14d570785e6760284a9849f9bafd0a9825a1a25
Gitweb:     http://git.kernel.org/tip/f14d570785e6760284a9849f9bafd0a9825a1a25
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Fri, 17 Oct 2014 12:17:40 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 17 Oct 2014 12:17:40 -0300

perf evsel: No need to drag util/cgroup.h

The only thing we need is a forward declaration for 'struct cgroup_sel', that is inside 'struct perf_evsel'.

Include cgroup.h instead on the tools that support cgroups.

Cc Adrian Hunter <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc David Ahern <[email protected]>
Cc Don Zickus <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jean Pihet <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 tools/perf/builtin-record.c | 1 +
 tools/perf/builtin-stat.c   | 1 +
 tools/perf/util/evsel.c     | 1 +
 tools/perf/util/evsel.h     | 3 ++-
 4 files changed, 5 insertions(+), 1 deletion(-)
tools/perf/builtin-record.c +1 -0
index a6b2132..2583a9b 100644
@@ -15,6 +15,7 @@
 #include "util/parse-events.h"
 
 #include "util/callchain.h"
+#include "util/cgroup.h"
 #include "util/header.h"
 #include "util/event.h"
 #include "util/evlist.h"
tools/perf/builtin-stat.c +1 -0
index b22c62f..055ce92 100644
@@ -43,6 +43,7 @@
 
 #include "perf.h"
 #include "builtin.h"
+#include "util/cgroup.h"
 #include "util/util.h"
 #include "util/parse-options.h"
 #include "util/parse-events.h"
tools/perf/util/evsel.c +1 -0
index 786ea55..2f9e680 100644
@@ -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"
tools/perf/util/evsel.h +2 -1
index 1d5c754..163c560 100644
@@ -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,