RFR: JDK-8298597 : HdrSeq: support for a merge() method

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri Dec 16 03:35:47 UTC 2022


A merge functionality on stats (distributions) was needed for the remembered set scan that I was using in some companion work. This PR implements a first cut at that, which is sufficient for our first (and only) use case.

Unfortunately, for expediency, I am deferring work on decaying statistics, as a result of which users that want decaying statistics will get incorrect results.

In the sort term, before I open this draft for review, I'll:

- [x] add tests
- [x] ensure that if a merge action has been taken on a distribution, then any attempt to access a decayed statistic causes an error
- [x] open a linked ticket to take care of the decayed statistics

An important goal here was to have an API that would be efficient and correct. The API shape may change when we have considered how to handle decaying statistics.

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

Commit messages:
 - Safety tests for decayed stats, until implemented.
 - gtest for merge.
 - Vanilla merge test for ShenandoahNumberSeq; needs to be extended some.
 - Changes based on experience with uses in RS scan stats.
 - Merge branch 'master' into stats_merge
 - More merge() implementation.
 - Interim checkin of code w/beginnings of merge() support. Some
 - First cut at merge. More changes to come. May not build yet.

Changes: https://git.openjdk.org/shenandoah/pull/184/files
 Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=184&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8298597
  Stats: 227 lines in 5 files changed: 225 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/shenandoah/pull/184.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah pull/184/head:pull/184

PR: https://git.openjdk.org/shenandoah/pull/184


More information about the shenandoah-dev mailing list