diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-05-30 10:48:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-31 08:20:25 -0400 |
commit | 74c355fbdfedd3820046dba4f537876cea54c207 (patch) | |
tree | 3a07851e63f5eb9a233286c6683f7e8c7d9d61a2 /kernel/events | |
parent | 89e1be50c68eb5e58b873dce87bbac627ee18d1f (diff) |
perf, cgroups: Fix up for new API
Ben changed the cgroup API in commit f780bdb7c1c (cgroups: add
per-thread subsystem callbacks) in an incompatible way, but
forgot to convert the perf cgroup bits.
Avoid compile warnings and runtime splats and convert perf too ;-)
Acked-by: Ben Blum <bblum@andrew.cmu.edu>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1306767651.1200.2990.camel@twins
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/core.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index c09767f7db3e..8a15944bf9d2 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -7394,26 +7394,12 @@ static int __perf_cgroup_move(void *info) | |||
7394 | return 0; | 7394 | return 0; |
7395 | } | 7395 | } |
7396 | 7396 | ||
7397 | static void perf_cgroup_move(struct task_struct *task) | 7397 | static void |
7398 | perf_cgroup_attach_task(struct cgroup *cgrp, struct task_struct *task) | ||
7398 | { | 7399 | { |
7399 | task_function_call(task, __perf_cgroup_move, task); | 7400 | task_function_call(task, __perf_cgroup_move, task); |
7400 | } | 7401 | } |
7401 | 7402 | ||
7402 | static void perf_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | ||
7403 | struct cgroup *old_cgrp, struct task_struct *task, | ||
7404 | bool threadgroup) | ||
7405 | { | ||
7406 | perf_cgroup_move(task); | ||
7407 | if (threadgroup) { | ||
7408 | struct task_struct *c; | ||
7409 | rcu_read_lock(); | ||
7410 | list_for_each_entry_rcu(c, &task->thread_group, thread_group) { | ||
7411 | perf_cgroup_move(c); | ||
7412 | } | ||
7413 | rcu_read_unlock(); | ||
7414 | } | ||
7415 | } | ||
7416 | |||
7417 | static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, | 7403 | static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, |
7418 | struct cgroup *old_cgrp, struct task_struct *task) | 7404 | struct cgroup *old_cgrp, struct task_struct *task) |
7419 | { | 7405 | { |
@@ -7425,7 +7411,7 @@ static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, | |||
7425 | if (!(task->flags & PF_EXITING)) | 7411 | if (!(task->flags & PF_EXITING)) |
7426 | return; | 7412 | return; |
7427 | 7413 | ||
7428 | perf_cgroup_move(task); | 7414 | perf_cgroup_attach_task(cgrp, task); |
7429 | } | 7415 | } |
7430 | 7416 | ||
7431 | struct cgroup_subsys perf_subsys = { | 7417 | struct cgroup_subsys perf_subsys = { |
@@ -7434,6 +7420,6 @@ struct cgroup_subsys perf_subsys = { | |||
7434 | .create = perf_cgroup_create, | 7420 | .create = perf_cgroup_create, |
7435 | .destroy = perf_cgroup_destroy, | 7421 | .destroy = perf_cgroup_destroy, |
7436 | .exit = perf_cgroup_exit, | 7422 | .exit = perf_cgroup_exit, |
7437 | .attach = perf_cgroup_attach, | 7423 | .attach_task = perf_cgroup_attach_task, |
7438 | }; | 7424 | }; |
7439 | #endif /* CONFIG_CGROUP_PERF */ | 7425 | #endif /* CONFIG_CGROUP_PERF */ |