RFR: 8261125: Move VM_Operation to vmOperation.hpp

Ioi Lam iklam at openjdk.java.net
Fri Feb 5 05:53:39 UTC 2021


On Thu, 4 Feb 2021 22:24:38 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Hi Ioi,
> 
> The distinction between vmOperation versus vmOperations is far too subtle. Perhaps as Dan implied vm_Operation.hpp or VM_Operation.hpp (though that breaks normal - odd - naming convention).

How about this:

- runtime/vmOperation.hpp   --- (new file) this is the file that declares VM_Operation
- runtime/commonVMOperations.hpp -- (renamed from vmOperations.hpp) these are the VM_Operation subclasses that no one cares to organize properly :-)

this will be kinda consistent with these existing files:

- gc/g1/g1VMOperations.hpp
- gc/g1/g1VMOperations.cpp
- gc/shenandoah/shenandoahVMOperations.cpp
- gc/shenandoah/shenandoahVMOperations.hpp
- gc/shared/gcVMOperations.cpp
- gc/shared/gcVMOperations.hpp
- gc/parallel/psVMOperations.cpp
- gc/parallel/psVMOperations.hpp

(I should also add a new vmOperation.cpp, and rename vmOperations.cpp to commonVMOperations.cpp)

BTW, I need to refactor VM_Exit into its own file. It's used by the `JVM_LEAF` macro in interfaceSupport.inline.hpp, but I don't want to pull in all the other "common" operations in there.  I am thinking of calling it vmExit.hpp (since exitVMOperation.hpp doesn't really look good).

> I assume most files that include vmOperation.hpp are those that define VM_Operation subclasses?

Yes, but there are also files that use the `VM_Operation::VMOp_Type` type, notably safepoint.hpp.

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

PR: https://git.openjdk.java.net/jdk/pull/2398


More information about the shenandoah-dev mailing list