RFR: Only use dlvsym for libnuma lookups if it's available

Mikael Vidstedt mikael.vidstedt at oracle.com
Wed Apr 12 01:58:58 UTC 2017


In os_linux.cpp/os::Linux::libnuma_dlsym dlvsym(3) is used to do versioned lookup of various libnuma symbols. According to the JBS issue [1] corresponding to the change which introduced it, the reason seems to be that the NUMA API changed between versions, and that dlsym in some cases found the newest version of the libnuma symbols where the VM expects to get the older version. This all seems messy at best..

dlvsym is not available in musl. Just to work around the problem, I use dlsym to look up dlvsym, and only use it if it is available. While it does solve the immediate problem, I have to wonder if there isn’t a better way to do this.

http://cr.openjdk.java.net/~mikael/webrevs/portola/dlvsym/webrev.00/hotspot/webrev/

Cheers,
Mikael

[1] https://bugs.openjdk.java.net/browse/JDK-6840196



More information about the portola-dev mailing list