RFR: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll
Jonathan Dowland
jdowland at redhat.com
Mon Mar 15 12:44:05 UTC 2021
Hi,
Thanks for your review!
On Sun, Mar 14, 2021 at 12:32:07PM +0000, Alan Bateman wrote:
> I think this looks okay. I assume the deletion of the locals refs at
> the end of createNetworkInterface aren't really needed, but harmless.
For the case where the JNI entrypoint is createNetworkInterface, they
are superfluous. But, when the entrypoint is some other function (getAll
in this case) which calls createNetworkInterface, they impact the
threshold quite significantly. On my system, without those deletions,
the thresholds are breached twice with a single network interface.
> It may be useful to update
> test/jdk/java/net/NetworkInterface/Test.java to have it run with
> -Xcheck:jni for both the default and -Djava.net.preferIPv4Stack=true
> cases.
I'm happy to do that (and I'll push that in a second). I don't see any
impact on the JTreport or JTwork output after doing so, though, and
whether the thresholds are breached or not is highly dependent on the
status of the test running system's network configuration.
--
Jonathan Dowland <jdowland at redhat.com>
Senior Software Engineer, OpenJDK, Red Hat
More information about the net-dev
mailing list