From: Martin Peschke this patch makes printk_clock() a generic kernel-wide nsec-resolution timestamp_clock(). It's used both by printk() as well as the statistics infrastructure to provide unified time stamps to users. Signed-off-by: Martin Peschke Signed-off-by: Andrew Morton --- lib/statistic.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff -puN lib/statistic.c~statistics-infrastructure-update-3 lib/statistic.c --- devel/lib/statistic.c~statistics-infrastructure-update-3 2006-05-30 17:45:38.000000000 -0700 +++ devel-akpm/lib/statistic.c 2006-05-30 17:45:55.000000000 -0700 @@ -152,7 +152,8 @@ static int statistic_alloc(struct statis struct statistic_info *info) { int cpu, node; - stat->age = sched_clock(); + + stat->age = timestamp_clock(); if (unlikely(info->flags & STATISTIC_FLAGS_NOINCR)) { stat->pdata = statistic_alloc_ptr(stat, -1); if (unlikely(!stat->pdata)) @@ -177,7 +178,7 @@ static int statistic_alloc(struct statis static int statistic_start(struct statistic *stat) { - stat->started = sched_clock(); + stat->started = timestamp_clock(); stat->state = STATISTIC_STATE_ON; return 0; } @@ -188,7 +189,7 @@ static void _statistic_barrier(void *unu static int statistic_stop(struct statistic *stat) { - stat->stopped = sched_clock(); + stat->stopped = timestamp_clock(); stat->state = STATISTIC_STATE_OFF; /* ensures that all CPUs have ceased updating statistics */ smp_mb(); @@ -243,7 +244,7 @@ static int statistic_reset(struct statis else for_each_possible_cpu(cpu) statistic_reset_ptr(stat, stat->pdata->ptrs[cpu]); - stat->age = sched_clock(); + stat->age = timestamp_clock(); statistic_transition(stat, info, prev_state); return 0; } _