RFR (M): 8129558: Coalesce dead objects during removal of self-forwarded pointers

Thomas Schatzl thomas.schatzl at oracle.com
Thu Jun 25 18:18:25 UTC 2015


Hi Tony,

On Thu, 2015-06-25 at 12:35 -0400, Tony Printezis wrote:
> Thomas,
> 
> 
> One nit and one question:
> 
> 
>  144   // Fill the memory area from start to end with a dead object, and update the BOT
>  145   // and the mark bitmap.
>  146   void zap_dead_objects(HeapWord* start, HeapWord* end) {
> 
> 
> the nit: The comment should now be “with dead objects” (and I’d prefer
> "with filler objects”) instead of “with dead object” given that
> fill_with_objects(), called from zap_dead_objects(), might place up to
> two objects in the area (given your previous change, right?).

Will fix that.
> 
> the (related) question: Do you set the BOT for [start, end) assuming
> one filler object but in reality [start, end) might have two objects?
> I looked at the code for cross_threshold() / BOT::alloc_block() and it
> looks as if they set up the BOT as if [start, end) is covered by a
> single object (but I could have misread the code). This will result in
> some (most likely very rare) cases where BOT look-ups will do more
> work than they should. Should you do fill_with_objects() first, then
> iterate over the filler objects, and update the BOT for each?

You are right about this. However considering these are going to be dead
objects, they will never be iterated over using the BOT in performance
sensitive code.

I need to check though if some verification code might not like this
situation.

Maybe I can find some good fix for that.

Thanks,
  Thomas






More information about the hotspot-gc-dev mailing list