8290374: Shenandoah: Remove inaccurate comment on SBS::load_reference_barrier()

Reviewed-by: shade
This commit is contained in:
Zhengyu Gu 2022-07-20 12:42:13 +00:00
parent 984cd02dfb
commit 011958d30b

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2021, Red Hat, Inc. All rights reserved.
* Copyright (c) 2015, 2022, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -84,13 +84,8 @@ inline oop ShenandoahBarrierSet::load_reference_barrier(oop obj) {
_heap->in_collection_set(obj)) { // Subsumes NULL-check
assert(obj != NULL, "cset check must have subsumed NULL-check");
oop fwd = resolve_forwarded_not_null(obj);
// TODO: It should not be necessary to check evac-in-progress here.
// We do it for mark-compact, which may have forwarded objects,
// and objects in cset and gets here via runtime barriers.
// We can probably fix this as soon as mark-compact has its own
// marking phase.
if (obj == fwd && _heap->is_evacuation_in_progress()) {
Thread* t = Thread::current();
Thread* t = Thread::current();
ShenandoahEvacOOMScope oom_evac_scope(t);
return _heap->evacuate_object(obj, t);
}