aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-08 11:36:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-08 11:36:15 -0400
commit33726bf2140a0e7c9de3ccd7cba6d69962f0b773 (patch)
treea4f5bca74d61072533806a2fe7f257357cae1ce2 /kernel
parent5b28f6a25ee202046e2d57bd431671bc23cf3dd1 (diff)
parentd7ebe75b065a7c2d58ffc12f9d2e00d5ea4e71eb (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf: Fix comments in include/linux/perf_event.h perf: Comment /proc/sys/kernel/perf_event_paranoid to be part of user ABI perf python: Fix argument name list of read_on_cpu() perf evlist: Don't die if sample_{id_all|type} is invalid perf python: Use exception to propagate errors perf evlist: Remove dependency on debug routines perf, cgroups: Fix up for new API
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/core.c22
-rw-r--r--kernel/sysctl.c6
2 files changed, 10 insertions, 18 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index d863b3c057bb..9efe7108ccaf 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7402,26 +7402,12 @@ static int __perf_cgroup_move(void *info)
7402 return 0; 7402 return 0;
7403} 7403}
7404 7404
7405static void perf_cgroup_move(struct task_struct *task) 7405static void
7406perf_cgroup_attach_task(struct cgroup *cgrp, struct task_struct *task)
7406{ 7407{
7407 task_function_call(task, __perf_cgroup_move, task); 7408 task_function_call(task, __perf_cgroup_move, task);
7408} 7409}
7409 7410
7410static void perf_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
7411 struct cgroup *old_cgrp, struct task_struct *task,
7412 bool threadgroup)
7413{
7414 perf_cgroup_move(task);
7415 if (threadgroup) {
7416 struct task_struct *c;
7417 rcu_read_lock();
7418 list_for_each_entry_rcu(c, &task->thread_group, thread_group) {
7419 perf_cgroup_move(c);
7420 }
7421 rcu_read_unlock();
7422 }
7423}
7424
7425static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, 7411static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp,
7426 struct cgroup *old_cgrp, struct task_struct *task) 7412 struct cgroup *old_cgrp, struct task_struct *task)
7427{ 7413{
@@ -7433,7 +7419,7 @@ static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp,
7433 if (!(task->flags & PF_EXITING)) 7419 if (!(task->flags & PF_EXITING))
7434 return; 7420 return;
7435 7421
7436 perf_cgroup_move(task); 7422 perf_cgroup_attach_task(cgrp, task);
7437} 7423}
7438 7424
7439struct cgroup_subsys perf_subsys = { 7425struct cgroup_subsys perf_subsys = {
@@ -7442,6 +7428,6 @@ struct cgroup_subsys perf_subsys = {
7442 .create = perf_cgroup_create, 7428 .create = perf_cgroup_create,
7443 .destroy = perf_cgroup_destroy, 7429 .destroy = perf_cgroup_destroy,
7444 .exit = perf_cgroup_exit, 7430 .exit = perf_cgroup_exit,
7445 .attach = perf_cgroup_attach, 7431 .attach_task = perf_cgroup_attach_task,
7446}; 7432};
7447#endif /* CONFIG_CGROUP_PERF */ 7433#endif /* CONFIG_CGROUP_PERF */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4fc92445a29c..f175d98bd355 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -938,6 +938,12 @@ static struct ctl_table kern_table[] = {
938 }, 938 },
939#endif 939#endif
940#ifdef CONFIG_PERF_EVENTS 940#ifdef CONFIG_PERF_EVENTS
941 /*
942 * User-space scripts rely on the existence of this file
943 * as a feature check for perf_events being enabled.
944 *
945 * So it's an ABI, do not remove!
946 */
941 { 947 {
942 .procname = "perf_event_paranoid", 948 .procname = "perf_event_paranoid",
943 .data = &sysctl_perf_event_paranoid, 949 .data = &sysctl_perf_event_paranoid,