RFR: 8261075: Create stubRoutines.inline.hpp with SafeFetch implementation [v2]

Stefan Karlsson stefank at openjdk.java.net
Tue Feb 16 16:14:41 UTC 2021


On Tue, 16 Feb 2021 16:04:05 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> If you put non-trivial code in the header, then it should go into an .inline.hpp file (or .cpp file). From the style-guide:
>> Do not put non-trivial function implementations in .hpp files. If the implementation depends on other .hpp files, put it in a .cpp or a .inline.hpp file.
>> It doesn't matter if there exists a .hpp file or not. However, what's non-trivial becomes a judgment call. I tend to use rule that if it uses code from another header, then it's non-trivial, and should most likely be moved out of the .hpp file.
>
>> It doesn't matter if there exists a .hpp file or not. However, what's non-trivial becomes a judgment call. I tend to use rule that if it uses code from another header, then it's non-trivial, and should most likely be moved out of the .hpp file.
> 
> I suppose this file to be on the edge between trivial and not. Later, it will have a W^X transition and will include thread.hpp, I don't want to rename it again. @stefank, what do you think, should it be safefetch.inline.hpp? Or are you fine with safefetch.hpp?

I'm fine with leaving it as safefetch.hpp.

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

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


More information about the hotspot-dev mailing list