aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-04-06 05:45:10 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-07 04:49:00 -0400
commit4af4998b8aa35600f4c4a4f3c3a23baca6081d02 (patch)
treec980ff7f7c9f21acf873184ec9d63cfb6435a2a5 /include/linux/perf_counter.h
parent4c9e25428ff46b968a30f1dfafdba550cb6e4141 (diff)
perf_counter: rework context time
Since perf_counter_context is switched along with tasks, we can maintain the context time without using the task runtime clock. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> LKML-Reference: <20090406094518.353552838@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 0f5a4005048f..7f5d353d78ac 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -477,14 +477,10 @@ struct perf_counter_context {
477 struct task_struct *task; 477 struct task_struct *task;
478 478
479 /* 479 /*
480 * time_now is the current time in nanoseconds since an arbitrary 480 * Context clock, runs when context enabled.
481 * point in the past. For per-task counters, this is based on the
482 * task clock, and for per-cpu counters it is based on the cpu clock.
483 * time_lost is an offset from the task/cpu clock, used to make it
484 * appear that time only passes while the context is scheduled in.
485 */ 481 */
486 u64 time_now; 482 u64 time;
487 u64 time_lost; 483 u64 timestamp;
488#endif 484#endif
489}; 485};
490 486