United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7126480 Make JVM start time in milliseconds since the Java epoch available
JDK-7126480 : Make JVM start time in milliseconds since the Java epoch available

Details
Type:
Enhancement
Submit Date:
2012-01-02
Status:
Closed
Updated Date:
2012-03-29
Project Name:
JDK
Resolved Date:
2012-03-29
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b10)

Related Reports
Backport:
Backport:

Sub Tasks

Description
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.

                                    

Comments
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().
                                     
2012-01-02
EVALUATION

Ok.
                                     
2012-01-02
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().
                                     
2012-01-05
EVALUATION

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

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

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/2e0ef19fc891
                                     
2012-03-22



Hardware and Software, Engineered to Work Together