8027294: Prepare hotspot for non TOD based uptime counter

Use HR timer when available for os::elapsed_counter() on linux/bsd. Add a new counter for the JVM uptime.

Reviewed-by: dholmes, sla
This commit is contained in:
Jaroslav Bachorik 2013-10-25 09:07:58 +02:00
parent 86cd1aaa73
commit 76ac5b0c28
4 changed files with 12 additions and 12 deletions

View file

@ -1032,6 +1032,9 @@ static jlong get_long_attribute(jmmLongAttribute att) {
case JMM_JVM_INIT_DONE_TIME_MS:
return Management::vm_init_done_time();
case JMM_JVM_UPTIME_MS:
return Management::ticks_to_ms(os::elapsed_counter());
case JMM_COMPILE_TOTAL_TIME_MS:
return Management::ticks_to_ms(CompileBroker::total_compilation_ticks());