RFR: 8261127: Cleanup THREAD/TRAPS/CHECK usage in CDS code [v4]
David Holmes
dholmes at openjdk.java.net
Mon Feb 8 23:19:58 UTC 2021
> While examining changes related to the TRAPS macro I noticed that a number of CDS related methods were passed a thread parameter that ended up never being used. Fixing this percolates up the call chain resulting in the ability to remove the parameter from other calls. In some places the thread is needed and has to be manifested via Thread::current(), but these are few and non-critical, and the cleanup of the API (including the benefit to the TRAPS work - see JDK-8252685) makes this worthwhile.
>
> I also changed `Thread* THREAD` to TRAPS where it relates to exception processing (even if CDS diverts to an abort path).
>
> Some uses of CHECK were removed that were only passing THREAD and the called code never triggers any exceptions.
>
> Added commentary where it is not clear why we don't use CHECK.
>
> Testing: local build and CI tiers 1-3
>
> Thanks,
> David
David Holmes has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
- merge
- Missed updating caller of resolve_classes() - which never lets exceptions propagate
- Reverted changes so TRAPS becomes Thread* THREAD again; and removed comment
- Fix typo
- 8261127: Cleanup THREAD/TRAPS/CHECK usage in CDS code
-------------
Changes: https://git.openjdk.java.net/jdk/pull/2397/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2397&range=03
Stats: 85 lines in 9 files changed: 1 ins; 16 del; 68 mod
Patch: https://git.openjdk.java.net/jdk/pull/2397.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2397/head:pull/2397
PR: https://git.openjdk.java.net/jdk/pull/2397
More information about the hotspot-runtime-dev
mailing list