[PATCH v3 18/46] perf/core: add arch_info field to struct perf_cgroup

From: David Carrillo-Cisneros
Date: Sat Oct 29 2016 - 20:47:11 EST


This is the first patch for cgroup support in this series.

Adds a new field to perf_cgroup that is used by intel_cmt pmu to
associate a monr with a perf_cgroup instance.

Signed-off-by: David Carrillo-Cisneros <davidcc@xxxxxxxxxx>
---
include/linux/perf_event.h | 4 +++-
kernel/events/core.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 0202b32..406119b 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -815,7 +815,9 @@ struct perf_cgroup_info {
};

struct perf_cgroup {
- struct cgroup_subsys_state css;
+ /* Architecture specific information. */
+ void *arch_info;
+ struct cgroup_subsys_state css;
struct perf_cgroup_info __percpu *info;
};

diff --git a/kernel/events/core.c b/kernel/events/core.c
index d99a51c..0de3ca5 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -10739,6 +10739,8 @@ perf_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)
return ERR_PTR(-ENOMEM);
}

+ jc->arch_info = NULL;
+
return &jc->css;
}

--
2.8.0.rc3.226.g39d4020