|
@@ -37,6 +37,7 @@
|
|
|
#include <linux/ftrace_event.h>
|
|
|
#include <linux/hw_breakpoint.h>
|
|
|
#include <linux/mm_types.h>
|
|
|
+#include <linux/cgroup.h>
|
|
|
|
|
|
#include "internal.h"
|
|
|
|
|
@@ -233,6 +234,20 @@ static void perf_ctx_unlock(struct perf_cpu_context *cpuctx,
|
|
|
|
|
|
#ifdef CONFIG_CGROUP_PERF
|
|
|
|
|
|
+/*
|
|
|
+ * perf_cgroup_info keeps track of time_enabled for a cgroup.
|
|
|
+ * This is a per-cpu dynamically allocated data structure.
|
|
|
+ */
|
|
|
+struct perf_cgroup_info {
|
|
|
+ u64 time;
|
|
|
+ u64 timestamp;
|
|
|
+};
|
|
|
+
|
|
|
+struct perf_cgroup {
|
|
|
+ struct cgroup_subsys_state css;
|
|
|
+ struct perf_cgroup_info *info;
|
|
|
+};
|
|
|
+
|
|
|
/*
|
|
|
* Must ensure cgroup is pinned (css_get) before calling
|
|
|
* this function. In other words, we cannot call this function
|