RFR: 8261125: Move VM_Operation to vmOperation.hpp
Coleen Phillimore
coleenp at openjdk.java.net
Fri Feb 5 17:37:39 UTC 2021
On Fri, 5 Feb 2021 05:51:22 GMT, Ioi Lam <iklam 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).
>>
>> I assume most files that include vmOperation.hpp are those that define VM_Operation subclasses?
>>
>> Thanks,
>> David
>
>> 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.
I'm fine with leaving vmOperations.hpp and vmOperation.hpp. It's not a big deal. commonVMOperations.hpp - too much noise!
I agree with David. interfaceSupport.inline.hpp imports a lot of things so importing vmOperations.hpp is not a big deal. vmOperations.hpp imports #include "runtime/threadSMR.hpp" otherwise it has all the same imports as interfaceSupport.inline.hpp anyway.
All these files are going to increase compilation time too.
I stand by my check mark above!
-------------
PR: https://git.openjdk.java.net/jdk/pull/2398
More information about the shenandoah-dev
mailing list