aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm
diff options
context:
space:
mode:
authorjmasa <none@none>2014-11-17 21:05:08 +0000
committerjmasa <none@none>2014-11-17 21:05:08 +0000
commit8d919c8c2af7139cc3a5e0263caa52f4980db018 (patch)
treed251cc83d296281d93b910bb0bf3320b72b78535 /src/share/vm
parent67f2547b5a1ee19f3ceff8b697c8f23c33d68667 (diff)
parent69351e9631db5b1eb7b14011436a346b2a5c46d5 (diff)
downloadjdk8u_hotspot-8d919c8c2af7139cc3a5e0263caa52f4980db018.tar.gz
Merge
Diffstat (limited to 'src/share/vm')
-rw-r--r--src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp8
-rw-r--r--src/share/vm/gc_implementation/g1/vm_operations_g1.cpp8
-rw-r--r--src/share/vm/gc_implementation/shared/concurrentGCThread.cpp7
-rw-r--r--src/share/vm/gc_implementation/shared/concurrentGCThread.hpp3
-rw-r--r--src/share/vm/runtime/interfaceSupport.cpp2
5 files changed, 23 insertions, 5 deletions
diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
index 0d43aa2ff..318b1b009 100644
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
@@ -50,8 +50,12 @@ HS_DTRACE_PROBE_DECL(hs_private, cms__remark__end);
void VM_CMS_Operation::acquire_pending_list_lock() {
// The caller may block while communicating
// with the SLT thread in order to acquire/release the PLL.
- ConcurrentMarkSweepThread::slt()->
- manipulatePLL(SurrogateLockerThread::acquirePLL);
+ SurrogateLockerThread* slt = ConcurrentMarkSweepThread::slt();
+ if (slt != NULL) {
+ slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
+ } else {
+ SurrogateLockerThread::report_missing_slt();
+ }
}
void VM_CMS_Operation::release_and_notify_pending_list_lock() {
diff --git a/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp b/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp
index 9b50ae6af..80a0f7281 100644
--- a/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp
+++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp
@@ -213,8 +213,12 @@ void VM_CGC_Operation::acquire_pending_list_lock() {
assert(_needs_pll, "don't call this otherwise");
// The caller may block while communicating
// with the SLT thread in order to acquire/release the PLL.
- ConcurrentMarkThread::slt()->
- manipulatePLL(SurrogateLockerThread::acquirePLL);
+ SurrogateLockerThread* slt = ConcurrentMarkThread::slt();
+ if (slt != NULL) {
+ slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
+ } else {
+ SurrogateLockerThread::report_missing_slt();
+ }
}
void VM_CGC_Operation::release_and_notify_pending_list_lock() {
diff --git a/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp b/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp
index 2de27d718..e39fd7a01 100644
--- a/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp
+++ b/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp
@@ -137,6 +137,13 @@ SurrogateLockerThread* SurrogateLockerThread::make(TRAPS) {
return res;
}
+void SurrogateLockerThread::report_missing_slt() {
+ vm_exit_during_initialization(
+ "GC before GC support fully initialized: "
+ "SLT is needed but has not yet been created.");
+ ShouldNotReachHere();
+}
+
void SurrogateLockerThread::manipulatePLL(SLT_msg_type msg) {
MutexLockerEx x(&_monitor, Mutex::_no_safepoint_check_flag);
assert(_buffer == empty, "Should be empty");
diff --git a/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp b/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp
index 4b82ed629..e87228b23 100644
--- a/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp
+++ b/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp
@@ -93,6 +93,9 @@ class SurrogateLockerThread: public JavaThread {
public:
static SurrogateLockerThread* make(TRAPS);
+ // Terminate VM with error message that SLT needed but not yet created.
+ static void report_missing_slt();
+
SurrogateLockerThread();
bool is_hidden_from_external_view() const { return true; }
diff --git a/src/share/vm/runtime/interfaceSupport.cpp b/src/share/vm/runtime/interfaceSupport.cpp
index 09757155d..3b338de6f 100644
--- a/src/share/vm/runtime/interfaceSupport.cpp
+++ b/src/share/vm/runtime/interfaceSupport.cpp
@@ -85,7 +85,7 @@ void InterfaceSupport::gc_alot() {
// Short-circuit any possible re-entrant gc-a-lot attempt
if (thread->skip_gcalot()) return;
- if (is_init_completed()) {
+ if (Threads::is_vm_complete()) {
if (++_fullgc_alot_invocation < FullGCALotStart) {
return;