RFR: 8263718: unused-result warning happens at os_linux.cpp

Yasumasa Suenaga ysuenaga at openjdk.java.net
Fri Mar 19 00:05:39 UTC 2021


On Thu, 18 Mar 2021 14:40:20 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

> > The alloca was added as a performance boost for hyperthreaded systems
> > back in 2003 for JDK 5:
> > "A per-thread offset was added to each thread's stack to randomize the
> > cachelines of hot stack frames (aka, stack coloring)."
> 
> IIUC it relates to share DTLB between two logical processors when Hyperthreading is enabled.

`alloca()` call might be less effective if ASLR is enabled. It can be configured by [randomize_va_space](https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#randomize-va-space), and I guess it is enabled in a lot of x86 systems.

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

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


More information about the hotspot-dev mailing list