> This is a continuation of effort from 
> https://github.com/openjdk/jdk/pull/9533 to fix the ObjectStreamClassCaching 
> test which is failing with various GCs != G1. The test class contains 2 test 
> methods:
> - test2CacheReleaseUnderMemoryPressure - this one was not logically changed 
> at all - just one method was inlined
> - test1CacheEffectiveness - this one now uses a different strategy which 
> doesn't involve calling System.gc() in order to trigger reference processing 
> in GC which is, as test failures reveal, sometimes to aggressive and triggers 
> processing not only WeakReference(s) but also SoftReference(s). Instead, the 
> test now gradually builds up memory pressure while checking what's happening 
> to two WeakReference(s): ref1 - wrapping a cached ObjectStreamClass instance; 
> and: ref2 - wrapping a new Object() instance. The "effectiveness" of caching 
> is confirmed by verifying that weakly reachable new Object() referent of ref2 
> is GC-ed earlier than softly reachable ObjectStreamClass referent of ref1.
> The test now contains several @run(s) with explicitly selected set of GC 
> algorithms: G1, Parallel, ZGC, Shenandoah.

Peter Levart has updated the pull request incrementally with one additional 
commit since the last revision:

  Nits from review comments

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/9684/files
  - new: https://git.openjdk.org/jdk/pull/9684/files/88f29edd..493740ca

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9684&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9684&range=01-02

  Stats: 10 lines in 1 file changed: 0 ins; 2 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/9684.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9684/head:pull/9684

PR: https://git.openjdk.org/jdk/pull/9684

Reply via email to