annotate src/share/vm/services/runtimeService.cpp @ 20804:7848fc12602b

Merge with jdk8u40-b25
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 07 Apr 2015 14:58:49 +0200
parents 4ca6dc0799b6 6f06ebb09080
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
12852
0db3ba3f6870 8026041: JVM crashes with assert "assert(is_updated()) failed: must not be clear" with -XX:+PrintGCApplicationConcurrentTime in -Xcomp mode
hseigel
parents: 10103
diff changeset
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1260
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1260
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1260
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #include "precompiled.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #include "classfile/classLoader.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27 #include "services/attachListener.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28 #include "services/management.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
29 #include "services/runtimeService.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
30 #include "utilities/dtrace.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
31 #include "utilities/exceptions.hpp"
8001
db9981fd3124 8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents: 6854
diff changeset
32 #include "utilities/macros.hpp"
0
a61af66fc99e Initial load
duke
parents:
diff changeset
33
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
34 #ifndef USDT2
0
a61af66fc99e Initial load
duke
parents:
diff changeset
35 HS_DTRACE_PROBE_DECL(hs_private, safepoint__begin);
a61af66fc99e Initial load
duke
parents:
diff changeset
36 HS_DTRACE_PROBE_DECL(hs_private, safepoint__end);
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
37 #endif /* !USDT2 */
0
a61af66fc99e Initial load
duke
parents:
diff changeset
38
6854
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 4006
diff changeset
39 #if INCLUDE_MANAGEMENT
0
a61af66fc99e Initial load
duke
parents:
diff changeset
40 TimeStamp RuntimeService::_app_timer;
a61af66fc99e Initial load
duke
parents:
diff changeset
41 TimeStamp RuntimeService::_safepoint_timer;
a61af66fc99e Initial load
duke
parents:
diff changeset
42 PerfCounter* RuntimeService::_sync_time_ticks = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
43 PerfCounter* RuntimeService::_total_safepoints = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
44 PerfCounter* RuntimeService::_safepoint_time_ticks = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
45 PerfCounter* RuntimeService::_application_time_ticks = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
46 PerfCounter* RuntimeService::_thread_interrupt_signaled_count = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
47 PerfCounter* RuntimeService::_interrupted_before_count = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
48 PerfCounter* RuntimeService::_interrupted_during_count = NULL;
20612
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
49 double RuntimeService::_last_safepoint_sync_time_sec = 0.0;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 void RuntimeService::init() {
a61af66fc99e Initial load
duke
parents:
diff changeset
52 // Make sure the VM version is initialized
a61af66fc99e Initial load
duke
parents:
diff changeset
53 Abstract_VM_Version::initialize();
a61af66fc99e Initial load
duke
parents:
diff changeset
54
a61af66fc99e Initial load
duke
parents:
diff changeset
55 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
56 EXCEPTION_MARK;
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58 _sync_time_ticks =
a61af66fc99e Initial load
duke
parents:
diff changeset
59 PerfDataManager::create_counter(SUN_RT, "safepointSyncTime",
a61af66fc99e Initial load
duke
parents:
diff changeset
60 PerfData::U_Ticks, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 _total_safepoints =
a61af66fc99e Initial load
duke
parents:
diff changeset
63 PerfDataManager::create_counter(SUN_RT, "safepoints",
a61af66fc99e Initial load
duke
parents:
diff changeset
64 PerfData::U_Events, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 _safepoint_time_ticks =
a61af66fc99e Initial load
duke
parents:
diff changeset
67 PerfDataManager::create_counter(SUN_RT, "safepointTime",
a61af66fc99e Initial load
duke
parents:
diff changeset
68 PerfData::U_Ticks, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
69
a61af66fc99e Initial load
duke
parents:
diff changeset
70 _application_time_ticks =
a61af66fc99e Initial load
duke
parents:
diff changeset
71 PerfDataManager::create_counter(SUN_RT, "applicationTime",
a61af66fc99e Initial load
duke
parents:
diff changeset
72 PerfData::U_Ticks, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74
a61af66fc99e Initial load
duke
parents:
diff changeset
75 // create performance counters for jvm_version and its capabilities
a61af66fc99e Initial load
duke
parents:
diff changeset
76 PerfDataManager::create_constant(SUN_RT, "jvmVersion", PerfData::U_None,
a61af66fc99e Initial load
duke
parents:
diff changeset
77 (jlong) Abstract_VM_Version::jvm_version(), CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
78
a61af66fc99e Initial load
duke
parents:
diff changeset
79 // I/O interruption related counters
a61af66fc99e Initial load
duke
parents:
diff changeset
80
a61af66fc99e Initial load
duke
parents:
diff changeset
81 // thread signaling via os::interrupt()
a61af66fc99e Initial load
duke
parents:
diff changeset
82
a61af66fc99e Initial load
duke
parents:
diff changeset
83 _thread_interrupt_signaled_count =
a61af66fc99e Initial load
duke
parents:
diff changeset
84 PerfDataManager::create_counter(SUN_RT,
a61af66fc99e Initial load
duke
parents:
diff changeset
85 "threadInterruptSignaled", PerfData::U_Events, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 // OS_INTRPT via "check before" in _INTERRUPTIBLE
a61af66fc99e Initial load
duke
parents:
diff changeset
88
a61af66fc99e Initial load
duke
parents:
diff changeset
89 _interrupted_before_count =
a61af66fc99e Initial load
duke
parents:
diff changeset
90 PerfDataManager::create_counter(SUN_RT, "interruptedBeforeIO",
a61af66fc99e Initial load
duke
parents:
diff changeset
91 PerfData::U_Events, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
92
a61af66fc99e Initial load
duke
parents:
diff changeset
93 // OS_INTRPT via "check during" in _INTERRUPTIBLE
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 _interrupted_during_count =
a61af66fc99e Initial load
duke
parents:
diff changeset
96 PerfDataManager::create_counter(SUN_RT, "interruptedDuringIO",
a61af66fc99e Initial load
duke
parents:
diff changeset
97 PerfData::U_Events, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99 // The capabilities counter is a binary representation of the VM capabilities in string.
a61af66fc99e Initial load
duke
parents:
diff changeset
100 // This string respresentation simplifies the implementation of the client side
a61af66fc99e Initial load
duke
parents:
diff changeset
101 // to parse the value.
a61af66fc99e Initial load
duke
parents:
diff changeset
102 char capabilities[65];
a61af66fc99e Initial load
duke
parents:
diff changeset
103 size_t len = sizeof(capabilities);
a61af66fc99e Initial load
duke
parents:
diff changeset
104 memset((void*) capabilities, '0', len);
a61af66fc99e Initial load
duke
parents:
diff changeset
105 capabilities[len-1] = '\0';
a61af66fc99e Initial load
duke
parents:
diff changeset
106 capabilities[0] = AttachListener::is_attach_supported() ? '1' : '0';
6854
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 4006
diff changeset
107 #if INCLUDE_SERVICES
0
a61af66fc99e Initial load
duke
parents:
diff changeset
108 capabilities[1] = '1';
6854
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 4006
diff changeset
109 #endif // INCLUDE_SERVICES
0
a61af66fc99e Initial load
duke
parents:
diff changeset
110 PerfDataManager::create_string_constant(SUN_RT, "jvmCapabilities",
a61af66fc99e Initial load
duke
parents:
diff changeset
111 capabilities, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
112 }
a61af66fc99e Initial load
duke
parents:
diff changeset
113 }
a61af66fc99e Initial load
duke
parents:
diff changeset
114
a61af66fc99e Initial load
duke
parents:
diff changeset
115 void RuntimeService::record_safepoint_begin() {
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
116 #ifndef USDT2
0
a61af66fc99e Initial load
duke
parents:
diff changeset
117 HS_DTRACE_PROBE(hs_private, safepoint__begin);
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
118 #else /* USDT2 */
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
119 HS_PRIVATE_SAFEPOINT_BEGIN();
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
120 #endif /* USDT2 */
1260
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
121
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
122 // Print the time interval in which the app was executing
12852
0db3ba3f6870 8026041: JVM crashes with assert "assert(is_updated()) failed: must not be clear" with -XX:+PrintGCApplicationConcurrentTime in -Xcomp mode
hseigel
parents: 10103
diff changeset
123 if (PrintGCApplicationConcurrentTime && _app_timer.is_updated()) {
10103
07a4efc5ed14 8012455: Missing time and date stamps for PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime
brutisso
parents: 8001
diff changeset
124 gclog_or_tty->date_stamp(PrintGCDateStamps);
07a4efc5ed14 8012455: Missing time and date stamps for PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime
brutisso
parents: 8001
diff changeset
125 gclog_or_tty->stamp(PrintGCTimeStamps);
1260
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
126 gclog_or_tty->print_cr("Application time: %3.7f seconds",
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
127 last_application_time_sec());
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
128 }
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
129
0
a61af66fc99e Initial load
duke
parents:
diff changeset
130 // update the time stamp to begin recording safepoint time
a61af66fc99e Initial load
duke
parents:
diff changeset
131 _safepoint_timer.update();
20612
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
132 _last_safepoint_sync_time_sec = 0.0;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
133 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
134 _total_safepoints->inc();
a61af66fc99e Initial load
duke
parents:
diff changeset
135 if (_app_timer.is_updated()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
136 _application_time_ticks->inc(_app_timer.ticks_since_update());
a61af66fc99e Initial load
duke
parents:
diff changeset
137 }
a61af66fc99e Initial load
duke
parents:
diff changeset
138 }
a61af66fc99e Initial load
duke
parents:
diff changeset
139 }
a61af66fc99e Initial load
duke
parents:
diff changeset
140
a61af66fc99e Initial load
duke
parents:
diff changeset
141 void RuntimeService::record_safepoint_synchronized() {
a61af66fc99e Initial load
duke
parents:
diff changeset
142 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
143 _sync_time_ticks->inc(_safepoint_timer.ticks_since_update());
a61af66fc99e Initial load
duke
parents:
diff changeset
144 }
20612
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
145 if (PrintGCApplicationStoppedTime) {
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
146 _last_safepoint_sync_time_sec = last_safepoint_time_sec();
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
147 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
148 }
a61af66fc99e Initial load
duke
parents:
diff changeset
149
a61af66fc99e Initial load
duke
parents:
diff changeset
150 void RuntimeService::record_safepoint_end() {
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
151 #ifndef USDT2
0
a61af66fc99e Initial load
duke
parents:
diff changeset
152 HS_DTRACE_PROBE(hs_private, safepoint__end);
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
153 #else /* USDT2 */
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
154 HS_PRIVATE_SAFEPOINT_END();
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
155 #endif /* USDT2 */
1260
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
156
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
157 // Print the time interval for which the app was stopped
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
158 // during the current safepoint operation.
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
159 if (PrintGCApplicationStoppedTime) {
10103
07a4efc5ed14 8012455: Missing time and date stamps for PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime
brutisso
parents: 8001
diff changeset
160 gclog_or_tty->date_stamp(PrintGCDateStamps);
07a4efc5ed14 8012455: Missing time and date stamps for PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime
brutisso
parents: 8001
diff changeset
161 gclog_or_tty->stamp(PrintGCTimeStamps);
1260
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
162 gclog_or_tty->print_cr("Total time for which application threads "
20612
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
163 "were stopped: %3.7f seconds, "
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
164 "Stopping threads took: %3.7f seconds",
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
165 last_safepoint_time_sec(),
6f06ebb09080 8059216: Make PrintGCApplicationStoppedTime print information about stopping threads
vkempik
parents: 12852
diff changeset
166 _last_safepoint_sync_time_sec);
1260
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
167 }
8859772195c6 6782663: Data produced by PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime is not accurate.
johnc
parents: 0
diff changeset
168
0
a61af66fc99e Initial load
duke
parents:
diff changeset
169 // update the time stamp to begin recording app time
a61af66fc99e Initial load
duke
parents:
diff changeset
170 _app_timer.update();
a61af66fc99e Initial load
duke
parents:
diff changeset
171 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
172 _safepoint_time_ticks->inc(_safepoint_timer.ticks_since_update());
a61af66fc99e Initial load
duke
parents:
diff changeset
173 }
a61af66fc99e Initial load
duke
parents:
diff changeset
174 }
a61af66fc99e Initial load
duke
parents:
diff changeset
175
a61af66fc99e Initial load
duke
parents:
diff changeset
176 void RuntimeService::record_application_start() {
a61af66fc99e Initial load
duke
parents:
diff changeset
177 // update the time stamp to begin recording app time
a61af66fc99e Initial load
duke
parents:
diff changeset
178 _app_timer.update();
a61af66fc99e Initial load
duke
parents:
diff changeset
179 }
a61af66fc99e Initial load
duke
parents:
diff changeset
180
a61af66fc99e Initial load
duke
parents:
diff changeset
181 // Don't need to record application end because we currently
a61af66fc99e Initial load
duke
parents:
diff changeset
182 // exit at a safepoint and record_safepoint_begin() handles updating
a61af66fc99e Initial load
duke
parents:
diff changeset
183 // the application time counter at VM exit.
a61af66fc99e Initial load
duke
parents:
diff changeset
184
a61af66fc99e Initial load
duke
parents:
diff changeset
185 jlong RuntimeService::safepoint_sync_time_ms() {
a61af66fc99e Initial load
duke
parents:
diff changeset
186 return UsePerfData ?
a61af66fc99e Initial load
duke
parents:
diff changeset
187 Management::ticks_to_ms(_sync_time_ticks->get_value()) : -1;
a61af66fc99e Initial load
duke
parents:
diff changeset
188 }
a61af66fc99e Initial load
duke
parents:
diff changeset
189
a61af66fc99e Initial load
duke
parents:
diff changeset
190 jlong RuntimeService::safepoint_count() {
a61af66fc99e Initial load
duke
parents:
diff changeset
191 return UsePerfData ?
a61af66fc99e Initial load
duke
parents:
diff changeset
192 _total_safepoints->get_value() : -1;
a61af66fc99e Initial load
duke
parents:
diff changeset
193 }
a61af66fc99e Initial load
duke
parents:
diff changeset
194 jlong RuntimeService::safepoint_time_ms() {
a61af66fc99e Initial load
duke
parents:
diff changeset
195 return UsePerfData ?
a61af66fc99e Initial load
duke
parents:
diff changeset
196 Management::ticks_to_ms(_safepoint_time_ticks->get_value()) : -1;
a61af66fc99e Initial load
duke
parents:
diff changeset
197 }
a61af66fc99e Initial load
duke
parents:
diff changeset
198
a61af66fc99e Initial load
duke
parents:
diff changeset
199 jlong RuntimeService::application_time_ms() {
a61af66fc99e Initial load
duke
parents:
diff changeset
200 return UsePerfData ?
a61af66fc99e Initial load
duke
parents:
diff changeset
201 Management::ticks_to_ms(_application_time_ticks->get_value()) : -1;
a61af66fc99e Initial load
duke
parents:
diff changeset
202 }
a61af66fc99e Initial load
duke
parents:
diff changeset
203
a61af66fc99e Initial load
duke
parents:
diff changeset
204 void RuntimeService::record_interrupted_before_count() {
a61af66fc99e Initial load
duke
parents:
diff changeset
205 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
206 _interrupted_before_count->inc();
a61af66fc99e Initial load
duke
parents:
diff changeset
207 }
a61af66fc99e Initial load
duke
parents:
diff changeset
208 }
a61af66fc99e Initial load
duke
parents:
diff changeset
209
a61af66fc99e Initial load
duke
parents:
diff changeset
210 void RuntimeService::record_interrupted_during_count() {
a61af66fc99e Initial load
duke
parents:
diff changeset
211 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
212 _interrupted_during_count->inc();
a61af66fc99e Initial load
duke
parents:
diff changeset
213 }
a61af66fc99e Initial load
duke
parents:
diff changeset
214 }
a61af66fc99e Initial load
duke
parents:
diff changeset
215
a61af66fc99e Initial load
duke
parents:
diff changeset
216 void RuntimeService::record_thread_interrupt_signaled_count() {
a61af66fc99e Initial load
duke
parents:
diff changeset
217 if (UsePerfData) {
a61af66fc99e Initial load
duke
parents:
diff changeset
218 _thread_interrupt_signaled_count->inc();
a61af66fc99e Initial load
duke
parents:
diff changeset
219 }
a61af66fc99e Initial load
duke
parents:
diff changeset
220 }
6854
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 4006
diff changeset
221
fb19af007ffc 7189254: Change makefiles for more flexibility to override defaults
jprovino
parents: 4006
diff changeset
222 #endif // INCLUDE_MANAGEMENT