Skip to content

8377909: Replace SummaryDiff's array implementation with a hashtable#29717

Draft
jdksjolen wants to merge 1 commit intoopenjdk:masterfrom
jdksjolen:summarydiff-ht
Draft

8377909: Replace SummaryDiff's array implementation with a hashtable#29717
jdksjolen wants to merge 1 commit intoopenjdk:masterfrom
jdksjolen:summarydiff-ht

Conversation

@jdksjolen
Copy link
Contributor

@jdksjolen jdksjolen commented Feb 13, 2026

Hi,

This PR replaces the array based approach to the SummaryDiff to a hashtable based one. This allows us to save space, as now we only store the diffs for the MemTags that actually changed. This will become more valuable as the number of MemTags in use increases.

As we anticipate most operations to only affect a small number of MemTags I utilize the stack for a small starting array of size 4. This helps us avoid unnecessary mallocs. In order to avoid unnecessary copying, I also changed a few functions from returning SummaryDiff to taking in one as a reference.

Old: sizeof(SummaryDiff) == 464
New: sizeof(SummaryDiff) == 112

Testing: Ran NMT Gtests, currently running tier1-tier3


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8377909: Replace SummaryDiff's array implementation with a hashtable (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29717/head:pull/29717
$ git checkout pull/29717

Update a local copy of the PR:
$ git checkout pull/29717
$ git pull https://git.openjdk.org/jdk.git pull/29717/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 29717

View PR using the GUI difftool:
$ git pr show -t 29717

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29717.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 13, 2026

👋 Welcome back jsjolen! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Feb 13, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title 8377909 8377909: Replace SummaryDiff's array implementation with a hashtable Feb 13, 2026
@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Feb 13, 2026
@openjdk
Copy link

openjdk bot commented Feb 13, 2026

@jdksjolen The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-runtime hotspot-runtime-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

1 participant