RFR: 8340012: [C2] assert(KlassEncodingMetaspaceMax > pd) failed: change encoding max if new encoding after 8338526 [v2]

Martin Doerr mdoerr at openjdk.org
Fri Sep 13 15:52:11 UTC 2024


On Fri, 13 Sep 2024 15:35:13 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add sanity check.
>
> src/hotspot/share/oops/compressedKlass.inline.hpp line 54:
> 
>> 52:   assert(check_alignment(v), "Address not aligned");
>> 53:   uint64_t pd = (uint64_t)(pointer_delta(v, narrow_base, 1));
>> 54:   assert(KlassEncodingMetaspaceMax > pd, "change encoding max if new encoding (Klass " PTR_FORMAT ", Base " PTR_FORMAT ")", p2i(v), p2i(narrow_base));
> 
> Would it be possible to leave this hunk out? I am in the process of rewriting large parts of this for Lilliput, so it won't survive in this current form. These things will be a lot better tested, and the assertion messages make more sense, too)

Thanks for taking a look! It would be possible to revert this part. But I don't understand the benefit. Wouldn't it be better to have this extra output for the time being? I don't know when Lilliput will make it to jdk head. It seems to be not targeted, yet.
Or will your new code be ready soon and contributed separately?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20971#discussion_r1759102290


More information about the hotspot-dev mailing list