lkml.org 
[lkml]   [2008]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectCalculating time in order of 0.1usec on x86 system
Hi,

I need to calculate time spent by a function in order of less then a microsecond on x86 SMP platform.

Current profiling tools and gettimeofday() are not sufficient.

So I am using get_cycles() to get the CPU cycles.

Now how do I convert it into the time interval?

Do I have to divide it by "cpu_khz" variable? Or some other method?
Is yes, what will be the unit of the result (time interval)? nsec/usec/msec?

e.g. get_cycles()/cpu_khz (unit?)

Or Is there more simpler method exist?

Regards,
Parav Pandit





\
 
 \ /
  Last update: 2008-09-30 09:11    [W:0.027 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site