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