diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 9ed3c0b1f24d51e60f58e50801c6e99e5005e58d..a5ae9ea7b47730030bd2025b7b17b6e2c932e1cb 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -441,3 +441,6 @@ ec4159ebe7050fcc5dcee8a2d150cf948ecc97db jdk-9+178 252475ccfd84cc249f8d6faf4b7806b5e2c384ce jdk-9+179 a133a7d1007b1456bc62824382fd8ac93b45d329 jdk-10+17 536b81db8075486ca0fe3225d8e59313df5b936c jdk-10+18 +b803e6cff41e72a1e6d8782e1ef7c25a6e3e5ee3 jdk-10+19 +d2982a786f53814367698e63efe6349c9128e1db jdk-9+180 +b656dea9398ef601f7fc08d1a5157a560e0ccbe0 jdk-9+181 diff --git a/hotspot/.hgtags b/hotspot/.hgtags index bd997249d7d386801c460522cb31e947b08bc242..282c094083050378ec879ba18903a875f40bcf8f 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -601,3 +601,6 @@ c1f3649a3a42f124b418a5a916dbad13d059b757 jdk-10+15 d2661aa42bff322badbe6c1337fc638d2e0f5730 jdk-9+179 73e2cb8700bfa51304bd4b02f224620859a3f600 jdk-10+17 c9d3317623d48da3327232c81e3f8cfc0d29d888 jdk-10+18 +33b74e13c1457f36041addb8b850831f81ca6e9f jdk-10+19 +d7baadc223e790c08bc69bf7e553bce65b4e7e40 jdk-9+180 +4a443796f6f57842d6a0434ac27ca3d1033ccc20 jdk-9+181 diff --git a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp index fce91a80ad36c23112eff55c3a0bfe824e6a18af..c044e9a0181728a2fa8126923c94cd68f6015dc5 100644 --- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -4389,6 +4389,15 @@ void G1CollectedHeap::enqueue_discovered_references(G1ParScanThreadStateSet* per rp->verify_no_references_recorded(); assert(!rp->discovery_enabled(), "should have been disabled"); + // If during an initial mark pause we install a pending list head which is not otherwise reachable + // ensure that it is marked in the bitmap for concurrent marking to discover. + if (collector_state()->during_initial_mark_pause()) { + oop pll_head = Universe::reference_pending_list(); + if (pll_head != NULL) { + _cm->grayRoot(pll_head); + } + } + // FIXME // CM's reference processing also cleans up the string and symbol tables. // Should we do that here also? We could, but it is a serial operation diff --git a/hotspot/src/share/vm/memory/universe.cpp b/hotspot/src/share/vm/memory/universe.cpp index d56e8dd3226bb781dc77f56d347da546f193ff1f..2d9dded4872d768369ce5b05d1de28fa134a6b64 100644 --- a/hotspot/src/share/vm/memory/universe.cpp +++ b/hotspot/src/share/vm/memory/universe.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -497,7 +497,11 @@ void Universe::fixup_mirrors(TRAPS) { #define assert_pll_ownership() assert_pll_locked(owned_by_self) oop Universe::reference_pending_list() { - assert_pll_ownership(); + if (Thread::current()->is_VM_thread()) { + assert_pll_locked(is_locked); + } else { + assert_pll_ownership(); + } return _reference_pending_list; }