2014-12-01 15:24:56 +01:00
|
|
|
/*
|
2018-03-29 14:07:59 +02:00
|
|
|
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
2014-12-01 15:24:56 +01:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "precompiled.hpp"
|
|
|
|
|
2016-12-11 19:07:04 -08:00
|
|
|
#include "aot/aotLoader.hpp"
|
2014-12-01 15:24:56 +01:00
|
|
|
#include "classfile/stringTable.hpp"
|
|
|
|
#include "classfile/systemDictionary.hpp"
|
|
|
|
#include "code/codeCache.hpp"
|
2015-05-13 15:16:06 +02:00
|
|
|
#include "gc/g1/bufferingOopClosure.hpp"
|
2015-09-04 09:47:35 +02:00
|
|
|
#include "gc/g1/g1CodeBlobClosure.hpp"
|
2015-05-13 15:16:06 +02:00
|
|
|
#include "gc/g1/g1CollectedHeap.inline.hpp"
|
2015-06-05 10:27:41 +02:00
|
|
|
#include "gc/g1/g1CollectorState.hpp"
|
2015-05-13 15:16:06 +02:00
|
|
|
#include "gc/g1/g1GCPhaseTimes.hpp"
|
2016-03-18 15:20:43 +01:00
|
|
|
#include "gc/g1/g1Policy.hpp"
|
2015-10-14 14:50:43 +02:00
|
|
|
#include "gc/g1/g1RootClosures.hpp"
|
2015-05-13 15:16:06 +02:00
|
|
|
#include "gc/g1/g1RootProcessor.hpp"
|
2015-08-06 15:49:50 +02:00
|
|
|
#include "gc/g1/heapRegion.inline.hpp"
|
2017-11-14 11:33:23 +01:00
|
|
|
#include "gc/shared/weakProcessor.hpp"
|
2014-12-01 15:24:56 +01:00
|
|
|
#include "memory/allocation.inline.hpp"
|
|
|
|
#include "runtime/mutex.hpp"
|
|
|
|
#include "services/management.hpp"
|
2017-07-17 09:30:07 +02:00
|
|
|
#include "utilities/macros.hpp"
|
2014-12-01 15:24:56 +01:00
|
|
|
|
|
|
|
void G1RootProcessor::worker_has_discovered_all_strong_classes() {
|
|
|
|
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
|
|
|
|
|
2015-04-14 09:44:06 -07:00
|
|
|
uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
|
2015-05-21 09:23:00 +02:00
|
|
|
if (new_value == n_workers()) {
|
2015-04-14 09:44:06 -07:00
|
|
|
// This thread is last. Notify the others.
|
|
|
|
MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
|
|
|
|
_lock.notify_all();
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void G1RootProcessor::wait_until_all_strong_classes_discovered() {
|
|
|
|
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
|
|
|
|
|
2015-05-21 09:23:00 +02:00
|
|
|
if ((uint)_n_workers_discovered_strong_classes != n_workers()) {
|
2014-12-01 15:24:56 +01:00
|
|
|
MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
|
2015-05-21 09:23:00 +02:00
|
|
|
while ((uint)_n_workers_discovered_strong_classes != n_workers()) {
|
2014-12-01 15:24:56 +01:00
|
|
|
_lock.wait(Mutex::_no_safepoint_check_flag, 0, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-21 09:23:00 +02:00
|
|
|
G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h, uint n_workers) :
|
2014-12-01 15:24:56 +01:00
|
|
|
_g1h(g1h),
|
2015-08-12 16:32:29 +02:00
|
|
|
_process_strong_tasks(G1RP_PS_NumElements),
|
2015-05-21 09:23:00 +02:00
|
|
|
_srs(n_workers),
|
2014-12-01 15:24:56 +01:00
|
|
|
_lock(Mutex::leaf, "G1 Root Scanning barrier lock", false, Monitor::_safepoint_check_never),
|
|
|
|
_n_workers_discovered_strong_classes(0) {}
|
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
void G1RootProcessor::evacuate_roots(G1EvacuationRootClosures* closures, uint worker_i) {
|
2014-12-01 15:24:56 +01:00
|
|
|
double ext_roots_start = os::elapsedTime();
|
2015-03-19 15:25:54 +01:00
|
|
|
G1GCPhaseTimes* phase_times = _g1h->g1_policy()->phase_times();
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
process_java_roots(closures, phase_times, worker_i);
|
2014-12-01 15:24:56 +01:00
|
|
|
|
|
|
|
// This is the point where this worker thread will not find more strong CLDs/nmethods.
|
|
|
|
// Report this so G1 can synchronize the strong and weak CLDs/nmethods processing.
|
2015-10-14 14:50:43 +02:00
|
|
|
if (closures->trace_metadata()) {
|
2014-12-01 15:24:56 +01:00
|
|
|
worker_has_discovered_all_strong_classes();
|
|
|
|
}
|
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
process_vm_roots(closures, phase_times, worker_i);
|
2016-09-12 16:34:36 +02:00
|
|
|
process_string_table_roots(closures, phase_times, worker_i);
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
// Now the CM ref_processor roots.
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CMRefRoots, worker_i);
|
2015-08-12 16:32:29 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_refProcessor_oops_do)) {
|
2015-03-19 15:25:54 +01:00
|
|
|
// We need to treat the discovered reference lists of the
|
|
|
|
// concurrent mark ref processor as roots and keep entries
|
|
|
|
// (which are added by the marking threads) on them live
|
|
|
|
// until they can be processed at the end of marking.
|
2015-10-14 14:50:43 +02:00
|
|
|
_g1h->ref_processor_cm()->weak_oops_do(closures->strong_oops());
|
2015-03-19 15:25:54 +01:00
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
if (closures->trace_metadata()) {
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::WaitForStrongCLD, worker_i);
|
|
|
|
// Barrier to make sure all workers passed
|
|
|
|
// the strong CLD and strong nmethods phases.
|
|
|
|
wait_until_all_strong_classes_discovered();
|
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
|
|
|
|
// Now take the complement of the strong CLDs.
|
2015-03-19 15:25:54 +01:00
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::WeakCLDRoots, worker_i);
|
2015-10-14 14:50:43 +02:00
|
|
|
assert(closures->second_pass_weak_clds() != NULL, "Should be non-null if we are tracing metadata.");
|
|
|
|
ClassLoaderDataGraph::roots_cld_do(NULL, closures->second_pass_weak_clds());
|
2015-03-19 15:25:54 +01:00
|
|
|
} else {
|
|
|
|
phase_times->record_time_secs(G1GCPhaseTimes::WaitForStrongCLD, worker_i, 0.0);
|
|
|
|
phase_times->record_time_secs(G1GCPhaseTimes::WeakCLDRoots, worker_i, 0.0);
|
2015-10-14 14:50:43 +02:00
|
|
|
assert(closures->second_pass_weak_clds() == NULL, "Should be null if not tracing metadata.");
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Finish up any enqueued closure apps (attributed as object copy time).
|
2015-10-14 14:50:43 +02:00
|
|
|
closures->flush();
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
double obj_copy_time_sec = closures->closure_app_seconds();
|
2014-12-01 15:24:56 +01:00
|
|
|
|
|
|
|
phase_times->record_time_secs(G1GCPhaseTimes::ObjCopy, worker_i, obj_copy_time_sec);
|
|
|
|
|
|
|
|
double ext_root_time_sec = os::elapsedTime() - ext_roots_start - obj_copy_time_sec;
|
|
|
|
|
|
|
|
phase_times->record_time_secs(G1GCPhaseTimes::ExtRootScan, worker_i, ext_root_time_sec);
|
|
|
|
|
|
|
|
// During conc marking we have to filter the per-thread SATB buffers
|
|
|
|
// to make sure we remove any oops into the CSet (which will show up
|
|
|
|
// as implicitly live).
|
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::SATBFiltering, worker_i);
|
2018-03-29 14:07:59 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_filter_satb_buffers) && _g1h->collector_state()->mark_or_rebuild_in_progress()) {
|
2014-12-01 15:24:56 +01:00
|
|
|
JavaThread::satb_mark_queue_set().filter_thread_buffers();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-12 16:32:29 +02:00
|
|
|
_process_strong_tasks.all_tasks_completed(n_workers());
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
// Adaptor to pass the closures to the strong roots in the VM.
|
|
|
|
class StrongRootsClosures : public G1RootClosures {
|
|
|
|
OopClosure* _roots;
|
|
|
|
CLDClosure* _clds;
|
|
|
|
CodeBlobClosure* _blobs;
|
|
|
|
public:
|
|
|
|
StrongRootsClosures(OopClosure* roots, CLDClosure* clds, CodeBlobClosure* blobs) :
|
|
|
|
_roots(roots), _clds(clds), _blobs(blobs) {}
|
|
|
|
|
|
|
|
OopClosure* weak_oops() { return NULL; }
|
|
|
|
OopClosure* strong_oops() { return _roots; }
|
|
|
|
|
|
|
|
CLDClosure* weak_clds() { return NULL; }
|
|
|
|
CLDClosure* strong_clds() { return _clds; }
|
|
|
|
|
|
|
|
CodeBlobClosure* strong_codeblobs() { return _blobs; }
|
|
|
|
};
|
|
|
|
|
2014-12-01 15:24:56 +01:00
|
|
|
void G1RootProcessor::process_strong_roots(OopClosure* oops,
|
|
|
|
CLDClosure* clds,
|
|
|
|
CodeBlobClosure* blobs) {
|
2015-10-14 14:50:43 +02:00
|
|
|
StrongRootsClosures closures(oops, clds, blobs);
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
process_java_roots(&closures, NULL, 0);
|
|
|
|
process_vm_roots(&closures, NULL, 0);
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2015-08-12 16:32:29 +02:00
|
|
|
_process_strong_tasks.all_tasks_completed(n_workers());
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
// Adaptor to pass the closures to all the roots in the VM.
|
|
|
|
class AllRootsClosures : public G1RootClosures {
|
|
|
|
OopClosure* _roots;
|
|
|
|
CLDClosure* _clds;
|
|
|
|
public:
|
|
|
|
AllRootsClosures(OopClosure* roots, CLDClosure* clds) :
|
|
|
|
_roots(roots), _clds(clds) {}
|
|
|
|
|
|
|
|
OopClosure* weak_oops() { return _roots; }
|
|
|
|
OopClosure* strong_oops() { return _roots; }
|
|
|
|
|
|
|
|
// By returning the same CLDClosure for both weak and strong CLDs we ensure
|
|
|
|
// that a single walk of the CLDG will invoke the closure on all CLDs i the
|
|
|
|
// system.
|
|
|
|
CLDClosure* weak_clds() { return _clds; }
|
|
|
|
CLDClosure* strong_clds() { return _clds; }
|
|
|
|
|
|
|
|
// We don't want to visit code blobs more than once, so we return NULL for the
|
|
|
|
// strong case and walk the entire code cache as a separate step.
|
|
|
|
CodeBlobClosure* strong_codeblobs() { return NULL; }
|
|
|
|
};
|
|
|
|
|
2014-12-01 15:24:56 +01:00
|
|
|
void G1RootProcessor::process_all_roots(OopClosure* oops,
|
|
|
|
CLDClosure* clds,
|
2016-09-12 16:34:36 +02:00
|
|
|
CodeBlobClosure* blobs,
|
|
|
|
bool process_string_table) {
|
2015-10-14 14:50:43 +02:00
|
|
|
AllRootsClosures closures(oops, clds);
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
process_java_roots(&closures, NULL, 0);
|
|
|
|
process_vm_roots(&closures, NULL, 0);
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2016-09-12 16:34:36 +02:00
|
|
|
if (process_string_table) {
|
|
|
|
process_string_table_roots(&closures, NULL, 0);
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
2016-09-12 16:34:36 +02:00
|
|
|
process_code_cache_roots(blobs, NULL, 0);
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2015-08-12 16:32:29 +02:00
|
|
|
_process_strong_tasks.all_tasks_completed(n_workers());
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2016-09-12 16:34:36 +02:00
|
|
|
void G1RootProcessor::process_all_roots(OopClosure* oops,
|
|
|
|
CLDClosure* clds,
|
|
|
|
CodeBlobClosure* blobs) {
|
|
|
|
process_all_roots(oops, clds, blobs, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void G1RootProcessor::process_all_roots_no_string_table(OopClosure* oops,
|
|
|
|
CLDClosure* clds,
|
|
|
|
CodeBlobClosure* blobs) {
|
|
|
|
assert(!ClassUnloading, "Should only be used when class unloading is disabled");
|
|
|
|
process_all_roots(oops, clds, blobs, false);
|
|
|
|
}
|
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
void G1RootProcessor::process_java_roots(G1RootClosures* closures,
|
2015-03-19 15:25:54 +01:00
|
|
|
G1GCPhaseTimes* phase_times,
|
|
|
|
uint worker_i) {
|
2014-12-01 15:24:56 +01:00
|
|
|
// Iterating over the CLDG and the Threads are done early to allow us to
|
|
|
|
// first process the strong CLDs and nmethods and then, after a barrier,
|
|
|
|
// let the thread process the weak CLDs and nmethods.
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CLDGRoots, worker_i);
|
2015-08-12 16:32:29 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_ClassLoaderDataGraph_oops_do)) {
|
2015-10-14 14:50:43 +02:00
|
|
|
ClassLoaderDataGraph::roots_cld_do(closures->strong_clds(), closures->weak_clds());
|
2015-03-19 15:25:54 +01:00
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ThreadRoots, worker_i);
|
2015-05-21 09:23:00 +02:00
|
|
|
bool is_par = n_workers() > 1;
|
2015-10-14 14:50:43 +02:00
|
|
|
Threads::possibly_parallel_oops_do(is_par,
|
|
|
|
closures->strong_oops(),
|
|
|
|
closures->strong_codeblobs());
|
2015-03-19 15:25:54 +01:00
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-10-14 14:50:43 +02:00
|
|
|
void G1RootProcessor::process_vm_roots(G1RootClosures* closures,
|
2015-03-19 15:25:54 +01:00
|
|
|
G1GCPhaseTimes* phase_times,
|
|
|
|
uint worker_i) {
|
2015-10-14 14:50:43 +02:00
|
|
|
OopClosure* strong_roots = closures->strong_oops();
|
|
|
|
OopClosure* weak_roots = closures->weak_oops();
|
|
|
|
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::UniverseRoots, worker_i);
|
2015-08-12 16:32:29 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_Universe_oops_do)) {
|
2015-03-19 15:25:54 +01:00
|
|
|
Universe::oops_do(strong_roots);
|
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JNIRoots, worker_i);
|
2015-08-12 16:32:29 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_JNIHandles_oops_do)) {
|
2015-03-19 15:25:54 +01:00
|
|
|
JNIHandles::oops_do(strong_roots);
|
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ObjectSynchronizerRoots, worker_i);
|
2015-08-12 16:32:29 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_ObjectSynchronizer_oops_do)) {
|
2015-03-19 15:25:54 +01:00
|
|
|
ObjectSynchronizer::oops_do(strong_roots);
|
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ManagementRoots, worker_i);
|
2015-08-12 16:32:29 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_Management_oops_do)) {
|
2015-03-19 15:25:54 +01:00
|
|
|
Management::oops_do(strong_roots);
|
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JVMTIRoots, worker_i);
|
2015-08-12 16:32:29 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_jvmti_oops_do)) {
|
2015-03-19 15:25:54 +01:00
|
|
|
JvmtiExport::oops_do(strong_roots);
|
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
|
2016-12-11 19:07:04 -08:00
|
|
|
#if INCLUDE_AOT
|
|
|
|
if (UseAOT) {
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::AOTCodeRoots, worker_i);
|
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_aot_oops_do)) {
|
|
|
|
AOTLoader::oops_do(strong_roots);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-03-19 15:25:54 +01:00
|
|
|
{
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::SystemDictionaryRoots, worker_i);
|
2015-08-12 16:32:29 +02:00
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_SystemDictionary_oops_do)) {
|
2015-03-19 15:25:54 +01:00
|
|
|
SystemDictionary::roots_oops_do(strong_roots, weak_roots);
|
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
2016-09-12 16:34:36 +02:00
|
|
|
}
|
2014-12-01 15:24:56 +01:00
|
|
|
|
2016-09-12 16:34:36 +02:00
|
|
|
void G1RootProcessor::process_string_table_roots(G1RootClosures* closures,
|
|
|
|
G1GCPhaseTimes* phase_times,
|
|
|
|
uint worker_i) {
|
|
|
|
assert(closures->weak_oops() != NULL, "Should only be called when all roots are processed");
|
|
|
|
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::StringTableRoots, worker_i);
|
|
|
|
// All threads execute the following. A specific chunk of buckets
|
|
|
|
// from the StringTable are the individual tasks.
|
|
|
|
StringTable::possibly_parallel_oops_do(closures->weak_oops());
|
|
|
|
}
|
|
|
|
|
|
|
|
void G1RootProcessor::process_code_cache_roots(CodeBlobClosure* code_closure,
|
|
|
|
G1GCPhaseTimes* phase_times,
|
|
|
|
uint worker_i) {
|
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_CodeCache_oops_do)) {
|
|
|
|
CodeCache::blobs_do(code_closure);
|
2014-12-01 15:24:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-14 11:33:23 +01:00
|
|
|
void G1RootProcessor::process_full_gc_weak_roots(OopClosure* oops) {
|
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_refProcessor_oops_do)) {
|
|
|
|
_g1h->ref_processor_stw()->weak_oops_do(oops);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!_process_strong_tasks.is_task_claimed(G1RP_PS_weakProcessor_oops_do)) {
|
|
|
|
WeakProcessor::oops_do(oops);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-21 09:23:00 +02:00
|
|
|
uint G1RootProcessor::n_workers() const {
|
|
|
|
return _srs.n_threads();
|
|
|
|
}
|