@@ -1237,7 +1237,9 @@ void ShenandoahHeap::concurrent_retire_gc_labs() {
1237
1237
1238
1238
// Safepoint workers may be asked to evacuate objects if they are visiting oops to create a heap dump
1239
1239
// during a concurrent evacuation phase. These threads will _not_ be used during a degenerated cycle.
1240
- safepoint_workers ()->threads_do (&retire);
1240
+ if (safepoint_workers () != nullptr ) {
1241
+ safepoint_workers ()->threads_do (&retire);
1242
+ }
1241
1243
1242
1244
// A degenerated cycle won't attempt to use LABs from the mutator threads
1243
1245
ShenandoahRetireJavaGCLABClosure retire_java_labs;
@@ -1400,14 +1402,6 @@ class ShenandoahCheckCleanGCLABClosure : public ThreadClosure {
1400
1402
}
1401
1403
};
1402
1404
1403
- class ShenandoahAssertNoLabs : public ThreadClosure {
1404
- public:
1405
- void do_thread (Thread* thread) override {
1406
- assert (ShenandoahThreadLocalData::gclab (thread) == nullptr , " Thread should not have GCLAB" );
1407
- assert (ShenandoahThreadLocalData::plab (thread) == nullptr , " Thread should not have PLAB" );
1408
- }
1409
- };
1410
-
1411
1405
void ShenandoahHeap::labs_make_parsable () {
1412
1406
assert (UseTLAB, " Only call with UseTLAB" );
1413
1407
@@ -1458,8 +1452,7 @@ void ShenandoahHeap::gclabs_retire(bool resize) {
1458
1452
workers ()->threads_do (&cl);
1459
1453
1460
1454
if (safepoint_workers () != nullptr ) {
1461
- ShenandoahAssertNoLabs no_labs;
1462
- safepoint_workers ()->threads_do (&no_labs);
1455
+ safepoint_workers ()->threads_do (&cl);
1463
1456
}
1464
1457
}
1465
1458
0 commit comments