4123 // Drain the queue - which may cause stealing
4124 G1ParEvacuateFollowersClosure drain_queue(_g1h, pss, _queues, &_terminator);
4125 drain_queue.do_void();
4126 // Allocation buffers were retired at the end of G1ParEvacuateFollowersClosure
4127 assert(pss->queue_is_empty(), "should be");
4128 }
4129 };
4130
4131 void G1CollectedHeap::process_weak_jni_handles() {
4132 double ref_proc_start = os::elapsedTime();
4133
4134 G1STWIsAliveClosure is_alive(this);
4135 G1KeepAliveClosure keep_alive(this);
4136 JNIHandles::weak_oops_do(&is_alive, &keep_alive);
4137
4138 double ref_proc_time = os::elapsedTime() - ref_proc_start;
4139 g1_policy()->phase_times()->record_ref_proc_time(ref_proc_time * 1000.0);
4140 }
4141
4142 void G1CollectedHeap::process_heap_monitoring() {
4143 log_develop_trace(gc, ref)("HeapSampling [other] : heap monitoring processing");
4144 G1STWIsAliveClosure is_alive(this);
4145 G1KeepAliveClosure keep_alive(this);
4146 HeapMonitoring::weak_oops_do(&is_alive, &keep_alive);
4147 }
4148
4149 void G1CollectedHeap::preserve_cm_referents(G1ParScanThreadStateSet* per_thread_states) {
4150 // Any reference objects, in the collection set, that were 'discovered'
4151 // by the CM ref processor should have already been copied (either by
4152 // applying the external root copy closure to the discovered lists, or
4153 // by following an RSet entry).
4154 //
4155 // But some of the referents, that are in the collection set, that these
4156 // reference objects point to may not have been copied: the STW ref
4157 // processor would have seen that the reference object had already
4158 // been 'discovered' and would have skipped discovering the reference,
4159 // but would not have treated the reference object as a regular oop.
4160 // As a result the copy closure would not have been applied to the
4161 // referent object.
4162 //
4163 // We need to explicitly copy these referent objects - the references
|
4123 // Drain the queue - which may cause stealing
4124 G1ParEvacuateFollowersClosure drain_queue(_g1h, pss, _queues, &_terminator);
4125 drain_queue.do_void();
4126 // Allocation buffers were retired at the end of G1ParEvacuateFollowersClosure
4127 assert(pss->queue_is_empty(), "should be");
4128 }
4129 };
4130
4131 void G1CollectedHeap::process_weak_jni_handles() {
4132 double ref_proc_start = os::elapsedTime();
4133
4134 G1STWIsAliveClosure is_alive(this);
4135 G1KeepAliveClosure keep_alive(this);
4136 JNIHandles::weak_oops_do(&is_alive, &keep_alive);
4137
4138 double ref_proc_time = os::elapsedTime() - ref_proc_start;
4139 g1_policy()->phase_times()->record_ref_proc_time(ref_proc_time * 1000.0);
4140 }
4141
4142 void G1CollectedHeap::process_heap_monitoring() {
4143 log_develop_trace(gc, ref)("Heap Sampler: heap monitoring processing");
4144 G1STWIsAliveClosure is_alive(this);
4145 G1KeepAliveClosure keep_alive(this);
4146 HeapMonitoring::weak_oops_do(&is_alive, &keep_alive);
4147 }
4148
4149 void G1CollectedHeap::preserve_cm_referents(G1ParScanThreadStateSet* per_thread_states) {
4150 // Any reference objects, in the collection set, that were 'discovered'
4151 // by the CM ref processor should have already been copied (either by
4152 // applying the external root copy closure to the discovered lists, or
4153 // by following an RSet entry).
4154 //
4155 // But some of the referents, that are in the collection set, that these
4156 // reference objects point to may not have been copied: the STW ref
4157 // processor would have seen that the reference object had already
4158 // been 'discovered' and would have skipped discovering the reference,
4159 // but would not have treated the reference object as a regular oop.
4160 // As a result the copy closure would not have been applied to the
4161 // referent object.
4162 //
4163 // We need to explicitly copy these referent objects - the references
|