JDK-7126480 : Make JVM start time in milliseconds since the Java epoch available
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs23
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-01-02
  • Updated: 2012-03-29
  • Resolved: 2012-03-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Make the JVM start time, in milliseconds since the Java epoch, available for
use by Java Flight Recorder and other facilities that might want it.

EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/2e0ef19fc891

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/2e0ef19fc891

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/2e0ef19fc891

SUGGESTED FIX Class Management in management.cpp stores the jvm start time in a class static called _begin_vm_creation_time. Rather than add an _vm_start_time_millis field to class os, we can just add an accessor for _begin_vm_creation_time to class Management and use the latter instead of a new os::vm_start_time_millis().


SUGGESTED FIX Add a method os::vm_start_time_millis() that returns the appropriate value. Use the same initial time as that used for os::elapsed_counter().