NEWHPROF: gethrvtime()/gettimeofday() vs JVMTI GetCurrentThreadCpuTime()
On Solaris, newhprof is using high res timer and gethrvtime().
On Linux, it's using gettimeofday().
On Windows, GetTime()?
If I use the JVMTI GetThreadCpuTime() the performance suffers.
Recent changes in HotSpot seem to have changed the old 1.4.2 behavior
of get_thread_cpu_time, making it much slower but more accurate.
The number of times this is called with cpu=times in newhprof (and old
hprof for that matter) makes it critical that it be fast.
On Solaris, newhprof is using high res timer and gethrvtime().
On Linux, it's using gettimeofday().
On Windows, GetTime()?
If I use the JVMTI GetThreadCpuTime() the performance suffers.
Recent changes in HotSpot seem to have changed the old 1.4.2 behavior
of get_thread_cpu_time, making it much slower but more accurate.
The number of times this is called with cpu=times in newhprof (and old
hprof for that matter) makes it critical that it be fast.