diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-19 10:20:42 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-23 12:45:16 +0100 |
commit | eef6cbf5844c620d9db9be99e4908cdf92492fb9 (patch) | |
tree | a4601e8d8ce64ca0f23f59b889360d578f663f5b /include/linux/init_task.h | |
parent | aa9c4c0f967fdb482ea95e8473ec3d201e6e0781 (diff) | |
download | blackbird-op-linux-eef6cbf5844c620d9db9be99e4908cdf92492fb9.tar.gz blackbird-op-linux-eef6cbf5844c620d9db9be99e4908cdf92492fb9.zip |
perfcounters: pull inherited counters
Change counter inheritance from a 'push' to a 'pull' model: instead of
child tasks pushing their final counts to the parent, reuse the wait4
infrastructure to pull counters as child tasks are exit-processed,
much like how cutime/cstime is collected.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r-- | include/linux/init_task.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 23fd8909b9e5..54fa2fa2c8e4 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -113,6 +113,14 @@ extern struct group_info init_groups; # define CAP_INIT_BSET CAP_INIT_EFF_SET #endif +#ifdef CONFIG_PERF_COUNTERS +# define INIT_PERF_COUNTERS(tsk) \ + .perf_counter_ctx.counter_list = \ + LIST_HEAD_INIT(tsk.perf_counter_ctx.counter_list), +#else +# define INIT_PERF_COUNTERS(tsk) +#endif + /* * INIT_TASK is used to set up the first task table, touch at * your own risk!. Base=0, limit=0x1fffff (=2MB) @@ -180,6 +188,7 @@ extern struct group_info init_groups; INIT_IDS \ INIT_TRACE_IRQFLAGS \ INIT_LOCKDEP \ + INIT_PERF_COUNTERS(tsk) \ } |