RFR (S): 8214791: Rename vm_operations_g1* files to g1VMOperations*

Per Liden per.liden at oracle.com
Wed Dec 5 22:47:31 UTC 2018


On 2018-12-05 23:01, David Holmes wrote:
[...]
>>> I don't know... I would suggest we have either a prefix or a suffix.
>>> The "midfix" (is that a word?) style is just strange. 
> 
> "infix" is the word. Yes infix is just plain weird here. :)

Ah, infix is the word, thanks ;)

> 
>>> For example:
>>>
>>>    runtime/vmOperations.hpp
>>>    gc/shared/gcVMOperations.hpp
>>>    gc/g1/g1VMOperations.hpp
>>>    gc/parallel/psVMOperations.hpp
>>>    gc/cms/cmsVMOperations.hpp
> 
> Much better.
> 
> I'm assuming there are reasons we have to repeat the "name" part in the 
> file name even though it's uniquely determined by the directory path?

There are actually good reasons for doing this. As you might know, in 
HotSpot there is just one global namespace for files (because of how the 
build system works), so you can't have gc/g1/mark.cpp and gc/z/mark.cpp 
as they would conflict. Prefixing avoids that problem.

I also find it natural that the filenames match the class names (and 
class names are also prefixed to avoid namespace conflicts).

[...]> I feel grateful that I rarely have to delve into a gc 
subdirectory ;-)

What?!? ;)

/Per



More information about the hotspot-gc-dev mailing list