void notify_jvmti_tagmaps() { #if INCLUDE_JVMTI // Notify JVMTI tagmaps that a STW weak reference processing might be // clearing entries, so the tagmaps need cleaning. Doing this here allows // the tagmap's oopstorage notification handler to not care whether it's // invoked by STW or concurrent reference processing.
JvmtiTagMap::set_needs_cleaning(); #endif// INCLUDE_JVMTI
}
uint WeakProcessor::ergo_workers(uint max_workers) { // Ignore ParallelRefProcEnabled; that's for j.l.r.Reference processing. if (ReferencesPerThread == 0) { // Configuration says always use all the threads. return max_workers;
}
// One thread per ReferencesPerThread references (or fraction thereof) // in the various OopStorage objects, bounded by max_threads.
size_t ref_count = 0; for (OopStorage* storage : OopStorageSet::Range<OopStorageSet::WeakId>()) {
ref_count += storage->allocation_count();
}
// +1 to (approx) round up the ref per thread division.
size_t nworkers = 1 + (ref_count / ReferencesPerThread);
nworkers = MIN2(nworkers, static_cast<size_t>(max_workers)); returnstatic_cast<uint>(nworkers);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.