RFR: 8268902: Testing for threadObj != NULL is unnecessary in handshake
Coleen Phillimore
coleenp at openjdk.java.net
Wed Jun 16 16:11:13 UTC 2021
The handshake code tests if the JavaThread->is_exiting or that the threadObj() is null. Ever since JDK-8244997, once the JavaThread is running, the _threadObj won't be null until JavaThread is destroyed. So testing is_exiting is all you need to do.
In gtest, the test JavaThread doesn't create a _threadObj JDK-8215948 so removing this unnecessary test allows writing gtests for handshakes.
Tested with tier1-6.
-------------
Commit messages:
- 8268902: Testing for threadObj != NULL is unnecessary in handshake
Changes: https://git.openjdk.java.net/jdk/pull/4512/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4512&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8268902
Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/4512.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4512/head:pull/4512
PR: https://git.openjdk.java.net/jdk/pull/4512
More information about the hotspot-runtime-dev
mailing list