RFR(XS): 8232921: assert(is_object_aligned(result)) failed: address not aligned

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Thu Oct 31 10:49:07 UTC 2019


> which is to preallocate a
> boolean(true) object, somewhere like universe.cpp.  Or put the
> bool_mirror() in that spot. 
This webrev allocates a Boolean in universe.cpp: 

Like this, the backtrace data structure looks nicer 
if you'd view it as a Java data structure.
But it spreads code around that should be local to the 
backtracebuilder.  It causes overhead in the initialization, 
instead of the rare cases of exceptions in hidden frames. 
Also, the Boolean wastes (a tiny bit) of space all the time.

java_lang_Boolean::get_TRUE is not working during the initialization
because the offsets are not yet set: java_lang_Boolean::_static_TRUE_offset
is zero.

webrev 01 passed our testing tonight.

Best regards,

> I don't think there's any downside to
> putting the methods array there, but it's really mind blowing.
> Sorry I didn't notice this in the review.  I should have looked more
> closely when I saw the PauseNoSafepointVerifier.
>    // GC unsafe class for assigning backtrace elements.  Allocation is
> only allowed
>    // in expand().
>    NoSafepointVerifier _nsv;
> You could add a comment like this.
> Coleen
> On 10/29/19 10:32 AM, Lindenmaier, Goetz wrote:
> > Hi,
> >
> > Originally, I wanted to model indicating that frames
> > have been dropped nicely in Java using
> > a meaningful java object. Exceptions in hidden frames
> > should be rare, so allocating only in that case should have
> > been cheap. Unfortunately, I can not allocate here.
> > Also, Boolean::TRUE is not necessarily initialized properly.
> >
> > Actually, putting the modeling aside, I only need any legal
> > oop for this field. It is only tested for null later on.
> > So the most simple (and cheap) fix is just reusing
> > one of the oops in the array at hand.
> >
> > So please review this fix.
> > http://cr.openjdk.java.net/~goetz/wr19/8232921-fix_hidden_frames/01/
> >
> > I'll run it through our testing tonight.
> >
> > Best regards,
> >    Goetz.

More information about the hotspot-runtime-dev mailing list