RFR(M): 8233787: Break cycle in vm_version* includes

Schmidt, Lutz lutz.schmidt at sap.com
Wed Nov 13 16:42:38 UTC 2019


Hi Kim,

there is a new webrev at http://cr.openjdk.java.net/~lucy/webrevs/8233787.01/ 

It should be pretty close to what you view as the "right approach". There weren't too many changes relative to 8233787.00. Most files already had #include runtime/vm_version.hpp. See the following grep output:

[jdk/src/hotspot] % grep -r vm_version_ * | grep include
cpu/ppc/vm_version_ext_ppc.cpp:#include "vm_version_ext_ppc.hpp"
cpu/s390/vm_version_ext_s390.cpp:#include "vm_version_ext_s390.hpp"
cpu/zero/vm_version_ext_zero.cpp:#include "vm_version_ext_zero.hpp"
cpu/x86/rdtsc_x86.cpp:#include "vm_version_ext_x86.hpp"
cpu/x86/vm_version_ext_x86.cpp:#include "vm_version_ext_x86.hpp"
cpu/arm/vm_version_ext_arm.cpp:#include "vm_version_ext_arm.hpp"
cpu/aarch64/vm_version_ext_aarch64.cpp:#include "vm_version_ext_aarch64.hpp"
cpu/sparc/vm_version_ext_sparc.cpp:#include "vm_version_ext_sparc.hpp"
os/bsd/os_perf_bsd.cpp:#include CPU_HEADER(vm_version_ext)
os/linux/os_perf_linux.cpp:#include CPU_HEADER(vm_version_ext)
os/windows/os_perf_windows.cpp:#include CPU_HEADER(vm_version_ext)
os/solaris/os_perf_solaris.cpp:#include CPU_HEADER(vm_version_ext)
os/aix/os_perf_aix.cpp:#include CPU_HEADER(vm_version_ext)
[jdk/src/hotspot] %

[jdk/src/hotspot] % grep -r abstract_vm_version * | grep include
cpu/ppc/vm_version_ppc.hpp:#include "runtime/abstract_vm_version.hpp"
cpu/s390/vm_version_s390.hpp:#include "runtime/abstract_vm_version.hpp"
cpu/zero/vm_version_zero.hpp:#include "runtime/abstract_vm_version.hpp"
cpu/x86/vm_version_x86.hpp:#include "runtime/abstract_vm_version.hpp"
cpu/arm/vm_version_arm.hpp:#include "runtime/abstract_vm_version.hpp"
cpu/aarch64/vm_version_aarch64.hpp:#include "runtime/abstract_vm_version.hpp"
cpu/sparc/vm_version_sparc.hpp:#include "runtime/abstract_vm_version.hpp"
[jdk/src/hotspot] %

Thanks for having a look!
Lutz


On 09.11.19, 02:58, "Kim Barrett" <kim.barrett at oracle.com> wrote:

    > On Nov 7, 2019, at 10:59 AM, Schmidt, Lutz <lutz.schmidt at sap.com> wrote:
    > 
    > Dear all,
    > 
    > may I please request reviews for this cleanup? It's a lot of files with just some #include statement changes. That makes the review process tedious and not very challenging intellectually.
    > 
    > Anyway, your effort is very much appreciated!
    > 
    > jdk/submit results pending.
    > 
    > Bug:    https://bugs.openjdk.java.net/browse/JDK-8233787
    > Webrev: http://cr.openjdk.java.net/~lucy/webrevs/8233787.00/ 
    > 
    > Thank you!
    > Lutz
    
    I don't think this is the right approach.  It makes all the
    vm_version_<cpu>.hpp files not be stand alone, which I think is not a
    good idea.
    
    I thik the real problem is that Abstract_VM_Version is declared in
    vm_version.hpp.  I think that file should be split into
    abstract_vm_version.hpp (with most of what's currently in
    vm_version.hpp), with vm_version.hpp being just (untested)
    
    <code>
    #ifndef SHARE_RUNTIME_VM_VERSION_HPP
    #define SHARE_RUNTIME_VM_VERSION_HPP
    
    #include "utilities/macros.hpp"
    #include CPU_HEADER(vm_version)
    
    #endif // SHARE_RUNTIME_VM_VERSION_HPP
    </code>
    
    Change all the vm_version_<cpu>.hpp files #include
    abstract_vm_version.hpp rather than vm_version.hpp.
    
    Other than in vm_version_<cpu>.hpp files, always #include
    vm_version.hpp.
    
    



More information about the hotspot-dev mailing list