RE: How to time in Kernel

David Schwartz (davids@webmaster.com)
Thu, 24 May 2001 00:38:54 -0700


> I am trying to time a portion of code inside the kernel. How do I do it?
> Can I use do_gettimeofday ? or do_getitimer ? Any leads will be
> appreciated.

If this is for personal debugging use only and you have a Pentium or better
x86 processor, I recommend reading the TSC directly. 'msr.h' (in the
asm-i386 include directory) include 'rdtsc' and friends.

DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/