@@ -1595,8 +1595,7 @@ void PSParallelCompact::summary_phase_msg(SpaceId dst_space_id,
1595
1595
}
1596
1596
#endif // #ifndef PRODUCT
1597
1597
1598
- void PSParallelCompact::summary_phase (ParCompactionManager* cm,
1599
- bool maximum_compaction)
1598
+ void PSParallelCompact::summary_phase (bool maximum_compaction)
1600
1599
{
1601
1600
GCTraceTime (Info, gc, phases) tm (" Summary Phase" , &_gc_timer);
1602
1601
@@ -1756,9 +1755,6 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
1756
1755
1757
1756
const PreGenGCValues pre_gc_values = heap->get_pre_gc_values ();
1758
1757
1759
- // Get the compaction manager reserved for the VM thread.
1760
- ParCompactionManager* const vmthread_cm = ParCompactionManager::get_vmthread_cm ();
1761
-
1762
1758
{
1763
1759
const uint active_workers =
1764
1760
WorkerPolicy::calc_active_workers (ParallelScavengeHeap::heap ()->workers ().max_workers (),
@@ -1787,11 +1783,11 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
1787
1783
1788
1784
ref_processor ()->start_discovery (maximum_heap_compaction);
1789
1785
1790
- marking_phase (vmthread_cm, &_gc_tracer);
1786
+ marking_phase (&_gc_tracer);
1791
1787
1792
1788
bool max_on_system_gc = UseMaximumCompactionOnSystemGC
1793
1789
&& GCCause::is_user_requested_gc (gc_cause);
1794
- summary_phase (vmthread_cm, maximum_heap_compaction || max_on_system_gc);
1790
+ summary_phase (maximum_heap_compaction || max_on_system_gc);
1795
1791
1796
1792
#if COMPILER2_OR_JVMCI
1797
1793
assert (DerivedPointerTable::is_active (), " Sanity" );
@@ -2063,8 +2059,7 @@ class ParallelCompactRefProcProxyTask : public RefProcProxyTask {
2063
2059
}
2064
2060
};
2065
2061
2066
- void PSParallelCompact::marking_phase (ParCompactionManager* cm,
2067
- ParallelOldTracer *gc_tracer) {
2062
+ void PSParallelCompact::marking_phase (ParallelOldTracer *gc_tracer) {
2068
2063
// Recursively traverse all live objects and mark them
2069
2064
GCTraceTime (Info, gc, phases) tm (" Marking Phase" , &_gc_timer);
2070
2065
@@ -2125,19 +2120,6 @@ void PSParallelCompact::marking_phase(ParCompactionManager* cm,
2125
2120
_gc_tracer.report_object_count_after_gc (is_alive_closure ());
2126
2121
}
2127
2122
2128
- #ifdef ASSERT
2129
- void PCAdjustPointerClosure::verify_cm (ParCompactionManager* cm) {
2130
- assert (cm != NULL , " associate ParCompactionManage should not be NULL" );
2131
- auto vmthread_cm = ParCompactionManager::get_vmthread_cm ();
2132
- if (Thread::current ()->is_VM_thread ()) {
2133
- assert (cm == vmthread_cm, " VM threads should use ParCompactionManager from get_vmthread_cm()" );
2134
- } else {
2135
- assert (Thread::current ()->is_Worker_thread (), " Must be a GC thread" );
2136
- assert (cm != vmthread_cm, " GC threads should use ParCompactionManager from gc_thread_compaction_manager()" );
2137
- }
2138
- }
2139
- #endif
2140
-
2141
2123
class PSAdjustTask final : public WorkerTask {
2142
2124
SubTasksDone _sub_tasks;
2143
2125
WeakProcessor::Task _weak_proc_task;
@@ -2528,9 +2510,7 @@ void PSParallelCompact::compact() {
2528
2510
2529
2511
{
2530
2512
GCTraceTime (Trace, gc, phases) tm (" Deferred Updates" , &_gc_timer);
2531
- // Update the deferred objects, if any. In principle, any compaction
2532
- // manager can be used. However, since the current thread is VM thread, we
2533
- // use the rightful one to keep the verification logic happy.
2513
+ // Update the deferred objects, if any.
2534
2514
ParCompactionManager* cm = ParCompactionManager::get_vmthread_cm ();
2535
2515
for (unsigned int id = old_space_id; id < last_space_id; ++id) {
2536
2516
update_deferred_objects (cm, SpaceId (id));
0 commit comments