RFR: Record location when asserting the code root correctness
Roman Kennke
rkennke at redhat.com
Fri Sep 21 11:29:24 UTC 2018
Am 21.09.2018 um 13:18 schrieb Aleksey Shipilev:
> We should really pass the "loc" into assert to let it know we read the oop from nmethod, for better
> diagnostics.
>
> diff -r 3cb10f96ca90 src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp Fri Sep 21 12:35:03 2018 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp Fri Sep 21 13:16:14 2018 +0200
> @@ -360,13 +360,14 @@
> void ShenandoahNMethod::assert_alive_and_correct() {
> assert(_nm->is_alive(), "only alive nmethods here");
> assert(_oops_count > 0, "should have filtered nmethods without oops before");
> ShenandoahHeap* heap = ShenandoahHeap::heap();
> for (int c = 0; c < _oops_count; c++) {
> - oop o = RawAccess<>::oop_load(_oops[c]);
> - shenandoah_assert_correct_except(NULL, o, o == NULL || heap->is_full_gc_move_in_progress());
> - assert(_nm->code_contains((address)_oops[c]) || _nm->oops_contains(_oops[c]), "nmethod should
> contain the oop*");
> + oop *loc = _oops[c];
> + oop o = RawAccess<>::oop_load(loc);
> + assert(_nm->code_contains((address) loc) || _nm->oops_contains(loc), "nmethod should contain
> the oop*");
> + shenandoah_assert_correct_except(loc, o, o == NULL || heap->is_full_gc_move_in_progress());
> }
> }
>
>
> Testing: tier3_gc_shenandoah
>
> Thanks,
> -Aleksey
>
Sure. Do it!
Roman
More information about the shenandoah-dev
mailing list