JDK-8351996, PR #24043, updated java.lang.ClassValue, but accidentally missed a 
piece of cache refresh code that is meaningful when the cache is speculatively 
invalidated by `remove` calls.

This caused a significant regression in the 
[PageRank](https://github.com/renaissance-benchmarks/renaissance/blob/master/benchmarks/apache-spark/src/main/scala/org/renaissance/apache/spark/PageRank.scala)
 benchmark, primarily because Scala array creation like `Array.fill` uses 
`scala.reflect.ClassTag` which uses `ClassValue`, making `ClassValue.get` a hot 
code path for every array creation.

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

Commit messages:
 - Merge branch 'master' of https://github.com/openjdk/jdk into 
fix/classvalue-cache-miss
 - Test
 - Cache miss when remove is called on another class

Changes: https://git.openjdk.org/jdk/pull/26679/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26679&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358535
  Stats: 75 lines in 2 files changed: 69 ins; 5 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26679.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26679/head:pull/26679

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

Reply via email to