Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7902944: JMH: Avoid weak references in Blackhole.consume(Object) #153

Merged

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Jan 9, 2025

See the bug for rationale. This avoids WeakReference-s completely through the aliased box trick. Not only this solves the original problem with inline types, it also allows for prompt reclamation of the objects, without relying on the specifics of VM reference processing.

I looked at jmh-core-benchmarks results, and they suggest this still works reliably without compiler blackholes. Compiler blackholes make all of this irrelevant.


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • CODETOOLS-7902944: JMH: Avoid weak references in Blackhole.consume(Object) (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 153

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jmh/pull/153.diff

Using Webrev

Link to Webrev Comment

@shipilev shipilev changed the title 7902944: JMH: Avoid direct weak references in Blackhole.consume(Object) 7902944: JMH: Avoid weak references in Blackhole.consume(Object) Jan 9, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 9, 2025

👋 Welcome back shade! 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 Jan 9, 2025

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 9, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 9, 2025

Webrevs

@shipilev shipilev merged commit f84a148 into openjdk:master Jan 10, 2025
30 checks passed
@shipilev shipilev deleted the CODETOOLS-7902944-weak-refs-bh-consume branch January 10, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant