101 NOT_MANAGEMENT_RETURN_(NULL);
102 static Klass* com_sun_management_internal_DiagnosticCommandImpl_klass(TRAPS)
103 NOT_MANAGEMENT_RETURN_(NULL);
104
105 static instanceOop create_thread_info_instance(ThreadSnapshot* snapshot, TRAPS);
106 static instanceOop create_thread_info_instance(ThreadSnapshot* snapshot, objArrayHandle monitors_array, typeArrayHandle depths_array, objArrayHandle synchronizers_array, TRAPS);
107 };
108
109 class TraceVmCreationTime : public StackObj {
110 private:
111 TimeStamp _timer;
112 jlong _begin_time;
113
114 public:
115 TraceVmCreationTime() {}
116 ~TraceVmCreationTime() {}
117
118 void start()
119 { _timer.update_to(0); _begin_time = os::javaTimeMillis(); }
120
121 /**
122 * Only call this if initialization completes successfully; it will
123 * crash if PerfMemory_exit() has already been called (usually by
124 * os::shutdown() when there was an initialization failure).
125 */
126 void end()
127 { Management::record_vm_startup_time(_begin_time, _timer.milliseconds()); }
128
129 };
130
131 #endif // SHARE_VM_SERVICES_MANAGEMENT_HPP
|
101 NOT_MANAGEMENT_RETURN_(NULL);
102 static Klass* com_sun_management_internal_DiagnosticCommandImpl_klass(TRAPS)
103 NOT_MANAGEMENT_RETURN_(NULL);
104
105 static instanceOop create_thread_info_instance(ThreadSnapshot* snapshot, TRAPS);
106 static instanceOop create_thread_info_instance(ThreadSnapshot* snapshot, objArrayHandle monitors_array, typeArrayHandle depths_array, objArrayHandle synchronizers_array, TRAPS);
107 };
108
109 class TraceVmCreationTime : public StackObj {
110 private:
111 TimeStamp _timer;
112 jlong _begin_time;
113
114 public:
115 TraceVmCreationTime() {}
116 ~TraceVmCreationTime() {}
117
118 void start()
119 { _timer.update_to(0); _begin_time = os::javaTimeMillis(); }
120
121 jlong begin_time() const {
122 return _begin_time;
123 }
124
125 /**
126 * Only call this if initialization completes successfully; it will
127 * crash if PerfMemory_exit() has already been called (usually by
128 * os::shutdown() when there was an initialization failure).
129 */
130 void end()
131 { Management::record_vm_startup_time(_begin_time, _timer.milliseconds()); }
132
133 };
134
135 #endif // SHARE_VM_SERVICES_MANAGEMENT_HPP
|