RFR: 8267579: Thread::cooked_allocated_bytes() hits assert(left >= right) failed: avoid underflow

Markus Grönlund mgronlun at openjdk.java.net
Fri Jun 4 15:39:08 UTC 2021


This is a workaround to avoid hitting the assert that was recently added to pointer_delta(). 

The implementation of cooked_allocated_bytes() is perhaps questionable, in that it reads tlab pointers optimistically. However, the functionality has been in place for a long time, and the impact of changing its behavior more substantially is unknown at this time, hence this defensive workaround to reduce noise and problems seen in general testing.

Testing: tier1, tier2, tier6, tier8

Thanks
Markus

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

Commit messages:
 - comment
 - Workaround JDK-8260046

Changes: https://git.openjdk.java.net/jdk/pull/4363/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4363&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267579
  Stats: 8 lines in 1 file changed: 7 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4363.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4363/head:pull/4363

PR: https://git.openjdk.java.net/jdk/pull/4363


More information about the hotspot-jfr-dev mailing list