RFR: 8356126: Revisit CaptureCallState [v2]
Chen Liang
liach at openjdk.org
Mon May 5 03:13:35 UTC 2025
> Credit to @lukellmann that the duplication arg handling in #24742 avoided throwing exceptions but produced a wrong option. This patch fixes that and removed stream usages in CaptureCallState to speed up bootstrap.
>
> Also, the previous patch affected the toString display of the option; I added a unit test to ensure the option prints names that is user-friendly.
>
> Another thing I noted is `CapturableState` uses `OperatingSystem`; using `valueOf` brings a performance overhead due to setups with reflection, so I made this lazy. (The enum is thread safe, so we allow racy access to the cache field)
>
> Testing: jdk/lang/foreign, tier 1-3 in progress.
Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
Further revamp, remove unnecessary instances on irrelevant platforms
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25025/files
- new: https://git.openjdk.org/jdk/pull/25025/files/94fca4b4..106ad252
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25025&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25025&range=00-01
Stats: 30 lines in 1 file changed: 12 ins; 4 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/25025.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25025/head:pull/25025
PR: https://git.openjdk.org/jdk/pull/25025
More information about the core-libs-dev
mailing list