mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8245825: Shenandoah: Remove diagnostic flag ShenandoahConcurrentScanCodeRoots
Reviewed-by: shade
This commit is contained in:
parent
db1ef58d5c
commit
b8d49f8c2f
3 changed files with 4 additions and 20 deletions
|
@ -308,9 +308,7 @@ void ShenandoahConcurrentMark::mark_roots(ShenandoahPhaseTimings::Phase root_pha
|
||||||
workers->run_task(&mark_roots);
|
workers->run_task(&mark_roots);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShenandoahConcurrentScanCodeRoots) {
|
clear_claim_codecache();
|
||||||
clear_claim_codecache();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShenandoahConcurrentMark::update_roots(ShenandoahPhaseTimings::Phase root_phase) {
|
void ShenandoahConcurrentMark::update_roots(ShenandoahPhaseTimings::Phase root_phase) {
|
||||||
|
@ -392,7 +390,7 @@ void ShenandoahConcurrentMark::initialize(uint workers) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShenandoahConcurrentMark::concurrent_scan_code_roots(uint worker_id, ReferenceProcessor* rp) {
|
void ShenandoahConcurrentMark::concurrent_scan_code_roots(uint worker_id, ReferenceProcessor* rp) {
|
||||||
if (ShenandoahConcurrentScanCodeRoots && claim_codecache()) {
|
if (claim_codecache()) {
|
||||||
ShenandoahObjToScanQueue* q = task_queues()->queue(worker_id);
|
ShenandoahObjToScanQueue* q = task_queues()->queue(worker_id);
|
||||||
if (!_heap->unload_classes()) {
|
if (!_heap->unload_classes()) {
|
||||||
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||||
|
@ -943,11 +941,9 @@ void ShenandoahConcurrentMark::mark_loop_work(T* cl, ShenandoahLiveData* live_da
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShenandoahConcurrentMark::claim_codecache() {
|
bool ShenandoahConcurrentMark::claim_codecache() {
|
||||||
assert(ShenandoahConcurrentScanCodeRoots, "must not be called otherwise");
|
|
||||||
return _claimed_codecache.try_set();
|
return _claimed_codecache.try_set();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShenandoahConcurrentMark::clear_claim_codecache() {
|
void ShenandoahConcurrentMark::clear_claim_codecache() {
|
||||||
assert(ShenandoahConcurrentScanCodeRoots, "must not be called otherwise");
|
|
||||||
_claimed_codecache.unset();
|
_claimed_codecache.unset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,17 +235,8 @@ void ShenandoahRootScanner<ITR>::roots_do(uint worker_id, OopClosure* oops, CLDC
|
||||||
assert(clds != NULL, "Only possible with CLD closure");
|
assert(clds != NULL, "Only possible with CLD closure");
|
||||||
_cld_roots.cld_do(clds, worker_id);
|
_cld_roots.cld_do(clds, worker_id);
|
||||||
|
|
||||||
// With ShenandoahConcurrentScanCodeRoots, we avoid scanning the entire code cache here,
|
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
|
||||||
// and instead do that in concurrent phase under the relevant lock. This saves init mark
|
_thread_roots.threads_do(&tc_cl, worker_id);
|
||||||
// pause time.
|
|
||||||
if (code != NULL && !ShenandoahConcurrentScanCodeRoots) {
|
|
||||||
_code_roots.code_blobs_do(code, worker_id);
|
|
||||||
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, NULL, tc);
|
|
||||||
_thread_roots.threads_do(&tc_cl, worker_id);
|
|
||||||
} else {
|
|
||||||
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
|
|
||||||
_thread_roots.threads_do(&tc_cl, worker_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
AlwaysTrueClosure always_true;
|
AlwaysTrueClosure always_true;
|
||||||
_dedup_roots.oops_do(&always_true, oops, worker_id);
|
_dedup_roots.oops_do(&always_true, oops, worker_id);
|
||||||
|
|
|
@ -345,9 +345,6 @@
|
||||||
diagnostic(bool, ShenandoahLoadRefBarrier, true, \
|
diagnostic(bool, ShenandoahLoadRefBarrier, true, \
|
||||||
"Turn on/off load-reference barriers in Shenandoah") \
|
"Turn on/off load-reference barriers in Shenandoah") \
|
||||||
\
|
\
|
||||||
diagnostic(bool, ShenandoahConcurrentScanCodeRoots, true, \
|
|
||||||
"Scan code roots concurrently, instead of during a pause") \
|
|
||||||
\
|
|
||||||
diagnostic(uintx, ShenandoahCodeRootsStyle, 2, \
|
diagnostic(uintx, ShenandoahCodeRootsStyle, 2, \
|
||||||
"Use this style to scan the code cache roots:" \
|
"Use this style to scan the code cache roots:" \
|
||||||
" 0 - sequential iterator;" \
|
" 0 - sequential iterator;" \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue