RFR: 8287384: Speed up jdk.test.lib.util.ForceGC
Xue-Lei Andrew Fan
xuelei at openjdk.java.net
Tue May 31 17:44:55 UTC 2022
On Thu, 26 May 2022 21:40:42 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:
> > Even using a Cleaner is a more overhead than necessary. I would have skipped the overhead of a cleaner and Atomic classes with something more self contained as a static method:
>
> I agreed that the using of Cleaner is still heavy, but it may be acceptable as the code is for testing only. If a new static method is introduced, test cases using the current API would also need update so as to benefit from it. I was hesitate for test cases update as it may involve more evaluations (and risks). But let me check.
I evaluated the use of ForceGC (10+ use). It looks like that the update should be straightforward for most of them. Most testing should be placed in case I missed something. I would like to file a new RFE and submit this PR, so that if something is wrong with new update, we could rollback to this.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8907
More information about the core-libs-dev
mailing list