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

Y. Srinivas Ramakrishna ysr at openjdk.org
Mon Dec 19 17:46:18 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 NaNs instead (or trigger guarantees).
> 
> 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.

Y. Srinivas Ramakrishna has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits:

 - Merge branch 'master' into stats_merge
 - Merge branch 'master' into stats_merge
 - 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.
   Fixed some bugs.
   
   -- We still need to implement a few vanilla tests for the merge method.
   -- Planning to defer the work on decayed stats (which will be delivered
   separately in a lower-priority sibling ticket)
 - Merge branch 'master' into stats_merge
 - More merge() implementation.
   -- Need to think about merge of decaying stats in AbsSeq.
   -- Need to add tests.
 - Interim checkin of code w/beginnings of merge() support. Some
   implementations are still stubbed out and need to be written.
 - 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=02
  Stats: 180 lines in 5 files changed: 153 ins; 2 del; 25 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