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>
This commit is contained in:
committed by
Ingo Molnar
parent
4c9e25428f
commit
4af4998b8a
@@ -477,14 +477,10 @@ struct perf_counter_context {
|
||||
struct task_struct *task;
|
||||
|
||||
/*
|
||||
* time_now is the current time in nanoseconds since an arbitrary
|
||||
* point in the past. For per-task counters, this is based on the
|
||||
* task clock, and for per-cpu counters it is based on the cpu clock.
|
||||
* time_lost is an offset from the task/cpu clock, used to make it
|
||||
* appear that time only passes while the context is scheduled in.
|
||||
* Context clock, runs when context enabled.
|
||||
*/
|
||||
u64 time_now;
|
||||
u64 time_lost;
|
||||
u64 time;
|
||||
u64 timestamp;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user