]> git.baikalelectronics.ru Git - kernel.git/commit
perf_event: Allocate children's perf_event_ctxp at the right time
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Wed, 9 Dec 2009 03:29:44 +0000 (11:29 +0800)
committerIngo Molnar <mingo@elte.hu>
Wed, 9 Dec 2009 08:56:27 +0000 (09:56 +0100)
commitc0aed921c5a120c363e2d45f123c34c1163d1210
treef3420ebd5fa80ddb1a4c3e302a64861146104385
parent2a3e6abf9a8d169a49372536cec6d049297b5163
perf_event: Allocate children's perf_event_ctxp at the right time

In current code, children task will allocate memory for
'child->perf_event_ctxp' if the parent is counted, we can
do it only if the parent allowed children inherit it.

It can save memory and reduce overhead.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <4B1F19A8.5040805@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c