diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-04 10:53:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-04 11:51:38 -0400 |
commit | 60313ebed739b331e8e61079da27a11ee3b73a30 (patch) | |
tree | 8476fbd05be709595876360765776dd9ca20608d /include/linux | |
parent | 20c84e959ec11b1803d2b2832eef703d5fbe7f7b (diff) |
perf_counter: Add fork event
Create a fork event so that we can easily clone the comm and
dso maps without having to generate all those events.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/perf_counter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 37d5541d74cb..380247bdb918 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -277,6 +277,14 @@ enum perf_event_type { | |||
277 | PERF_EVENT_UNTHROTTLE = 6, | 277 | PERF_EVENT_UNTHROTTLE = 6, |
278 | 278 | ||
279 | /* | 279 | /* |
280 | * struct { | ||
281 | * struct perf_event_header header; | ||
282 | * u32 pid, ppid; | ||
283 | * }; | ||
284 | */ | ||
285 | PERF_EVENT_FORK = 7, | ||
286 | |||
287 | /* | ||
280 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field | 288 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field |
281 | * will be PERF_RECORD_* | 289 | * will be PERF_RECORD_* |
282 | * | 290 | * |
@@ -618,6 +626,7 @@ extern void perf_counter_munmap(unsigned long addr, unsigned long len, | |||
618 | unsigned long pgoff, struct file *file); | 626 | unsigned long pgoff, struct file *file); |
619 | 627 | ||
620 | extern void perf_counter_comm(struct task_struct *tsk); | 628 | extern void perf_counter_comm(struct task_struct *tsk); |
629 | extern void perf_counter_fork(struct task_struct *tsk); | ||
621 | 630 | ||
622 | extern void perf_counter_task_migration(struct task_struct *task, int cpu); | 631 | extern void perf_counter_task_migration(struct task_struct *task, int cpu); |
623 | 632 | ||
@@ -673,6 +682,7 @@ perf_counter_munmap(unsigned long addr, unsigned long len, | |||
673 | unsigned long pgoff, struct file *file) { } | 682 | unsigned long pgoff, struct file *file) { } |
674 | 683 | ||
675 | static inline void perf_counter_comm(struct task_struct *tsk) { } | 684 | static inline void perf_counter_comm(struct task_struct *tsk) { } |
685 | static inline void perf_counter_fork(struct task_struct *tsk) { } | ||
676 | static inline void perf_counter_init(void) { } | 686 | static inline void perf_counter_init(void) { } |
677 | static inline void perf_counter_task_migration(struct task_struct *task, | 687 | static inline void perf_counter_task_migration(struct task_struct *task, |
678 | int cpu) { } | 688 | int cpu) { } |