aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-05-29 08:25:58 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-29 10:21:52 -0400
commitbbbee90829304d156c12b171c0ac7e6e1aba8b90 (patch)
treeec0a1a8c69a5c909a57227915734d1e55678eb5c /include
parent665c2142a94202881a3c11cbaee6506cb10ada2d (diff)
perf_counter: Ammend cleanup in fork() fail
When fork() fails we cannot use perf_counter_exit_task() since that assumes to operate on current. Write a new helper that cleans up unused/clean contexts. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/perf_counter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 717bf3b59ba4..519a41bba249 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -579,6 +579,7 @@ extern void perf_counter_task_sched_out(struct task_struct *task,
579extern void perf_counter_task_tick(struct task_struct *task, int cpu); 579extern void perf_counter_task_tick(struct task_struct *task, int cpu);
580extern int perf_counter_init_task(struct task_struct *child); 580extern int perf_counter_init_task(struct task_struct *child);
581extern void perf_counter_exit_task(struct task_struct *child); 581extern void perf_counter_exit_task(struct task_struct *child);
582extern void perf_counter_free_task(struct task_struct *task);
582extern void perf_counter_do_pending(void); 583extern void perf_counter_do_pending(void);
583extern void perf_counter_print_debug(void); 584extern void perf_counter_print_debug(void);
584extern void __perf_disable(void); 585extern void __perf_disable(void);
@@ -644,6 +645,7 @@ static inline void
644perf_counter_task_tick(struct task_struct *task, int cpu) { } 645perf_counter_task_tick(struct task_struct *task, int cpu) { }
645static inline int perf_counter_init_task(struct task_struct *child) { return 0; } 646static inline int perf_counter_init_task(struct task_struct *child) { return 0; }
646static inline void perf_counter_exit_task(struct task_struct *child) { } 647static inline void perf_counter_exit_task(struct task_struct *child) { }
648static inline void perf_counter_free_task(struct task_struct *task) { }
647static inline void perf_counter_do_pending(void) { } 649static inline void perf_counter_do_pending(void) { }
648static inline void perf_counter_print_debug(void) { } 650static inline void perf_counter_print_debug(void) { }
649static inline void perf_disable(void) { } 651static inline void perf_disable(void) { }