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

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Thu Oct 31 13:04:27 UTC 2019



On 10/31/19 6:49 AM, Lindenmaier, Goetz wrote:
> Hi,
>
>> 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:
> http://cr.openjdk.java.net/~goetz/wr19/8232921-fix_hidden_frames/02/
>
> 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.

I don't understand this sentence.  The patch 02 looks like it 
initializes it at the right place.  It doesn't work?

On second thought, I think I agree with you.  01 looks better, and if 
you can add the comment in BacktraceBuilder, it would be fine.

thanks,
Coleen

>
> webrev 01 passed our testing tonight.
>
> Best regards,
>    Goetz.
>
>> 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