Hi Alan, thanks for the info . Are you aware of a way to reliably see the info (e.g. in hs_err file) what version of libz was used at runtime ?
On linux (with some luck ) we see it in hs_err , at least a lot of distros put the version into the libname , and then it is displayed in the hs_err section Dynamic libraries: ... /lib64/libz.so.1.2.8 ... /lib64/libz.so.1.2.8 ... /lib64/libz.so.1.2.8 On macOSX you see nothing just because the version is not in the libname : Dynamic libraries: ... /usr/lib/libz.1.dylib Best regards, Matthias > -----Original Message----- > From: Alan Bateman <alan.bate...@oracle.com> > Sent: Freitag, 17. Mai 2019 09:47 > To: Baesken, Matthias <matthias.baes...@sap.com>; 'build- > d...@openjdk.java.net' <build-dev@openjdk.java.net> > Subject: Re: zlib configuration : system vs. bundled > > On 16/05/2019 15:18, Baesken, Matthias wrote: > > Hello Alan, > > > > I found > > > > http://mail.openjdk.java.net/pipermail/core-libs-dev/2015- > March/032106.html > > > > and > > > > http://mail.openjdk.java.net/pipermail/build-dev/2016- > February/thread.html#16602 > > > > but without much details on real or potential performance > improvements . > > > > Both discussion threads are pretty old. I do not think they cover the > changes done in the meantime in jdk9 and higher in the java.util.zip > package . > > I think a lot of coding there moved from C to Java , so the libz is > > used in > JDK less these days than in the "old times " . > Yes, the ZipFile implementation has changed significantly (many of the > motivations are listed in JDK-8142508) but the compression and checksum > (except CRC32C) will use libz. You'll see hotspot using it too, say when > running with -Xbootclasspath/a to add a JAR file to the boot class path. > There has many threads here and on core-libs-dev about using the bundled > vs. system zlib. It was an issue for the Linux distros in the early days > of OpenJDK as they have policies to not include copies of libraries that > the OS provides. At one point there was a patch proposing a XX option to > select the system vs. bundled zlib at run-time, the motivation being to > be able to switch to the Intel IPP implementation. It's impossible to > please everyone but I think the default that we settled on is probably > the best. > > -Alan