RFR: JDK-8061259: ParNew promotion failed is serialized on a lock
Kim Barrett
kim.barrett at oracle.com
Thu Jan 15 21:58:28 UTC 2015
On Jan 15, 2015, at 12:00 PM, Jungwoo Ha <jwha at google.com> wrote:
>
> Apparently, my memory's been swapped out. I meant to use _promotion_failed field.
>
> diff -r a184ee1d7172 src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
> --- a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Thu Jan 08 12:08:22 2015 -0800
> +++ b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Thu Jan 15 09:00:05 2015 -0800
> @@ -1194,8 +1194,10 @@
> return real_forwardee(old);
> }
>
> - new_obj = _next_gen->par_promote(par_scan_state->thread_num(),
> - old, m, sz);
> + if (!_promotion_failed) {
> + new_obj = _next_gen->par_promote(par_scan_state->thread_num(),
> + old, m, sz);
> + }
>
> if (new_obj == NULL) {
> // promotion failed, forward to self
Yes, this looks right.
Bengt mentioned protection with a flag from the original proposed change. I’m not sure there’s a need for a new flag for this version of the change.
More information about the hotspot-gc-dev
mailing list