Skip to content

8382150: Shenandoah: Clean up nmethod entry barrier support#30717

Open
shipilev wants to merge 1 commit intoopenjdk:masterfrom
shipilev:JDK-8382150-shenandoah-cleanup-nmethod-entry-barrier
Open

8382150: Shenandoah: Clean up nmethod entry barrier support#30717
shipilev wants to merge 1 commit intoopenjdk:masterfrom
shipilev:JDK-8382150-shenandoah-cleanup-nmethod-entry-barrier

Conversation

@shipilev
Copy link
Copy Markdown
Member

@shipilev shipilev commented Apr 14, 2026

We have this transitional method, ShenandoahCodeRoots::use_nmethod_barriers_for_mark(), added back when nmethod entry barriers were a new features. But today, continuations are always on, and class unloading is also always on. So there is no point it running in the mode where nmethod entry barriers are disabled. This is a clean up that is useful in further optimizations past Late Barrier Expansion.

Additionally, ShenandoahNMethod serves as the wrapper over *NMethodBarrierSet calls, so I cleaned up part of that interface as well.

Additional testing:

  • Linux x86_64 server fastdebug, hotspot_gc_shenandoah


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-8382150: Shenandoah: Clean up nmethod entry barrier support (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30717

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 14, 2026

👋 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
Copy Markdown

openjdk bot commented Apr 14, 2026

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

@openjdk openjdk bot added hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Apr 14, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 14, 2026

@shipilev The following labels will be automatically applied to this pull request:

  • hotspot-gc
  • shenandoah

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 14, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Apr 14, 2026

Webrevs

ShenandoahNMethodTable* ShenandoahCodeRoots::_nmethod_table;
int ShenandoahCodeRoots::_disarmed_value = 1;

bool ShenandoahCodeRoots::use_nmethod_barriers_for_mark() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there diagnostic value in having the capability to not use nmethod barriers? Would we ever turn them off for passive mode?

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

Labels

hotspot-gc hotspot-gc-dev@openjdk.org rfr Pull request is ready for review shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

2 participants