aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-06-04 06:28:05 -0400
committerIngo Molnar <mingo@elte.hu>2011-06-04 06:28:05 -0400
commit3ce2a0bc9dfb6423491afe0afc9f099e24b8cba4 (patch)
tree58fbef582846fef0e777b1a552aca12e21a071b1 /kernel/events
parentaef29bf20bd79c73992ab23d5067e9f0448b466e (diff)
parentaa4a221875873d2a1f9656cb7fd7e545e952b4fa (diff)
Merge branch 'perf/urgent' into perf/core
Conflicts: tools/perf/util/python.c Merge reason: resolve the conflict with perf/urgent. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index cc5d57d1d0b6..ba89f40abe6a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7388,26 +7388,12 @@ static int __perf_cgroup_move(void *info)
7388 return 0; 7388 return 0;
7389} 7389}
7390 7390
7391static void perf_cgroup_move(struct task_struct *task) 7391static void
7392perf_cgroup_attach_task(struct cgroup *cgrp, struct task_struct *task)
7392{ 7393{
7393 task_function_call(task, __perf_cgroup_move, task); 7394 task_function_call(task, __perf_cgroup_move, task);
7394} 7395}
7395 7396
7396static void perf_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
7397 struct cgroup *old_cgrp, struct task_struct *task,
7398 bool threadgroup)
7399{
7400 perf_cgroup_move(task);
7401 if (threadgroup) {
7402 struct task_struct *c;
7403 rcu_read_lock();
7404 list_for_each_entry_rcu(c, &task->thread_group, thread_group) {
7405 perf_cgroup_move(c);
7406 }
7407 rcu_read_unlock();
7408 }
7409}
7410
7411static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, 7397static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp,
7412 struct cgroup *old_cgrp, struct task_struct *task) 7398 struct cgroup *old_cgrp, struct task_struct *task)
7413{ 7399{
@@ -7419,7 +7405,7 @@ static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp,
7419 if (!(task->flags & PF_EXITING)) 7405 if (!(task->flags & PF_EXITING))
7420 return; 7406 return;
7421 7407
7422 perf_cgroup_move(task); 7408 perf_cgroup_attach_task(cgrp, task);
7423} 7409}
7424 7410
7425struct cgroup_subsys perf_subsys = { 7411struct cgroup_subsys perf_subsys = {
@@ -7428,6 +7414,6 @@ struct cgroup_subsys perf_subsys = {
7428 .create = perf_cgroup_create, 7414 .create = perf_cgroup_create,
7429 .destroy = perf_cgroup_destroy, 7415 .destroy = perf_cgroup_destroy,
7430 .exit = perf_cgroup_exit, 7416 .exit = perf_cgroup_exit,
7431 .attach = perf_cgroup_attach, 7417 .attach_task = perf_cgroup_attach_task,
7432}; 7418};
7433#endif /* CONFIG_CGROUP_PERF */ 7419#endif /* CONFIG_CGROUP_PERF */