RFR: 8214976: Warn about uses of functions replaced for portability
Kim Barrett
kim.barrett at oracle.com
Wed Jan 5 13:45:11 UTC 2022
> On Jan 5, 2022, at 7:34 AM, David Holmes <dholmes at openjdk.java.net> wrote:
> As I wrote in the bug report:
>
>> Just be mindful that this really only applies when shared code calls these functions. In os specific code it may be necessary/desirable to call the platform specific functions rather than the generic OS:: version.
>
> We do not need to go through the os:: portability layer when already in os-specific code. The only time we need to use the os:: layer in that case is when the os:: layer adds additional semantics (like NMT) that we want.
Calls that bypass the os:: portability layer require suppressing the warning for bypassing the portability layer.
I think in very nearly all such cases it’s better to stick with the portability layer, the obvious contrary case
being the implementation of the portability function in terms of the underlying “native” function.
More information about the hotspot-dev
mailing list