RFR : [XS] 8209942: [epsilon] range function for EpsilonTLABElasticity causes compiler warning

Volker Simonis volker.simonis at gmail.com
Wed Sep 5 12:11:08 UTC 2018


Hi Matthias,

your change looks good to me.

Also forwarding to Aleksey who is the initial author of the code.
@Aleksey: do you think the fix still keeps the intended semantics?

Thank you for fixing this,
Volker
On Wed, Sep 5, 2018 at 1:03 PM Baesken, Matthias
<matthias.baesken at sap.com> wrote:
>
> Hello,  when compiling    jdk/jdk   on Windows,  (with VS2017 update level 15.8 and not disabling warnings as errors )
> I came across  this  warning   leading to build error :
>
> C:/jdk-just-clone/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp(341): error C2220: warning treated as error - no 'object' file generated
> C:/jdk-just-clone/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp(341): warning C4305: 'argument': truncation from 'const intx' to 'double'
>
> Would have been helpful  to have a compiler flag set  that really   ***shows  the code***  leading to the warning/error  (because it comes from heavy macro expansion).
>
>
> The following  CR   ,   Reported by ralf.schmelter at sap.com<mailto:ralf.schmelter at sap.com>  , fixes the issue  :
>
> The flag -XX:EpsilonTLABElasticity (epsilon_globals.hpp, line 77) expects a double value, but uses max_intx in the allowed range.
> This leads to a truncation warning in the Windows build. If the value should only be guaranteed to be >= 1, then DBL_MAX should have been used instead.
>
>
> Webrev/bug :
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8209942/
>
> https://bugs.openjdk.java.net/browse/JDK-8209942
>
>
> Please review .
>
>
>
>
> Thanks, Matthias


More information about the hotspot-dev mailing list