RFR(XS): 8221482: Initialize VMRegImpl::regName[] earlier to prevent assert during PrintStubCode

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Mar 29 18:53:28 UTC 2019


On 3/28/19 8:59 PM, David Holmes wrote:
> Hi Lutz,
> 
> cc'd the compiler team
> 
> On 28/03/2019 9:14 pm, Schmidt, Lutz wrote:
>> Dear Community,
>>
>> may I please request reviews for this tiny change. The purpose is to initialize the regName[] 
>> array earlier during VM init.
> 
> I can see that will fix the assertion for you, but then begs the question as to whether 
> VMRegImpl::set_regName itself has any initialization dependencies. The answer to that is not obvious 
> to me. I _think_ the Register setup only depends on C++ static initialization.
> 
> Hopefully someone from compiler team can confirm this change is in fact safe.

The array is static:

http://hg.openjdk.java.net/jdk/jdk/file/6a1406c718ec/src/hotspot/share/code/vmreg.cpp#l37

And register's names are encoded:

http://hg.openjdk.java.net/jdk/jdk/file/6a1406c718ec/src/hotspot/cpu/x86/register_x86.cpp#l41

There are no initialization dependencies.

Vladimir

> 
> Thanks,
> David
> 
>> Bug:    https://bugs.openjdk.java.net/browse/JDK-8221482
>> Webrev: http://cr.openjdk.java.net/~lucy/webrevs/8221482.01/
>>
>> Submit-repo tests pending...
>>
>> Thanks,
>> Lutz
>>
>>


More information about the hotspot-compiler-dev mailing list