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

Schmidt, Lutz lutz.schmidt at sap.com
Wed Apr 3 13:18:21 UTC 2019


Hi Vladimir, 
thanks so much for your clarifying comments. And sorry for reacting with such delay. I was distracted by other tasks.

I'll go ahead now and push - after rebasing, of course. 

Thanks,
Lutz


On 29.03.19, 19:53, "Vladimir Kozlov" <vladimir.kozlov at oracle.com> wrote:

    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