diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-09-06 10:32:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-09-09 14:46:32 -0400 |
commit | b5ab4cd563e7ab49b27957704112a8ecade54e1f (patch) | |
tree | a5d1194e001a1203c679e1f0014d3b40118a725d /include/linux/perf_event.h | |
parent | b28ab83c595e767f2028276b7398d17f2253cec0 (diff) |
perf: Per cpu-context rotation timer
Give each cpu-context its own timer so that it is a self contained
entity, this eases the way for per-pmu-per-cpu contexts as well as
provides the basic infrastructure to allow different rotation
times per pmu.
Things to look at:
- folding the tick and these TICK_NSEC timers
- separate task context rotation
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus <paulus@samba.org>
Cc: stephane eranian <eranian@googlemail.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Yanmin <yanmin_zhang@linux.intel.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 4ab4f0ca09a1..fa04537df55b 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -861,6 +861,8 @@ struct perf_cpu_context { | |||
861 | struct perf_event_context *task_ctx; | 861 | struct perf_event_context *task_ctx; |
862 | int active_oncpu; | 862 | int active_oncpu; |
863 | int exclusive; | 863 | int exclusive; |
864 | u64 timer_interval; | ||
865 | struct hrtimer timer; | ||
864 | }; | 866 | }; |
865 | 867 | ||
866 | struct perf_output_handle { | 868 | struct perf_output_handle { |
@@ -881,7 +883,6 @@ extern void perf_pmu_unregister(struct pmu *pmu); | |||
881 | 883 | ||
882 | extern void perf_event_task_sched_in(struct task_struct *task); | 884 | extern void perf_event_task_sched_in(struct task_struct *task); |
883 | extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); | 885 | extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); |
884 | extern void perf_event_task_tick(struct task_struct *task); | ||
885 | extern int perf_event_init_task(struct task_struct *child); | 886 | extern int perf_event_init_task(struct task_struct *child); |
886 | extern void perf_event_exit_task(struct task_struct *child); | 887 | extern void perf_event_exit_task(struct task_struct *child); |
887 | extern void perf_event_free_task(struct task_struct *task); | 888 | extern void perf_event_free_task(struct task_struct *task); |
@@ -1067,8 +1068,6 @@ perf_event_task_sched_in(struct task_struct *task) { } | |||
1067 | static inline void | 1068 | static inline void |
1068 | perf_event_task_sched_out(struct task_struct *task, | 1069 | perf_event_task_sched_out(struct task_struct *task, |
1069 | struct task_struct *next) { } | 1070 | struct task_struct *next) { } |
1070 | static inline void | ||
1071 | perf_event_task_tick(struct task_struct *task) { } | ||
1072 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } | 1071 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } |
1073 | static inline void perf_event_exit_task(struct task_struct *child) { } | 1072 | static inline void perf_event_exit_task(struct task_struct *child) { } |
1074 | static inline void perf_event_free_task(struct task_struct *task) { } | 1073 | static inline void perf_event_free_task(struct task_struct *task) { } |