Skip to content

Conversation

@SoniaZaldana
Copy link
Member

@SoniaZaldana SoniaZaldana commented Dec 9, 2024

Hi all,

This PR addresses 8345647 addressing uses of NULL in Shenandoah. These should be replaced to null.

I verified where those uses are with:
git show <commit-id> --name-only | while read file; do echo "File: $file"; git diff <commit-id> -- "$file" | grep -n -F 'NULL'; done

The relevant output:

File: src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp
9:-  // No need for post barrier if storing NULL
File: src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
9:-    // must be either an oop or NULL
12:     if (t == TypePtr::NULL_PTR || t == Type::TOP)

Changes affect comments only.

Thanks,
Sonia


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-8345647: Fix recent NULL usage backsliding in Shenandoah (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22647

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 9, 2024

👋 Welcome back szaldana! 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 Dec 9, 2024

@SoniaZaldana This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8345647: Fix recent NULL usage backsliding in Shenandoah

Reviewed-by: shade, jwaters, mli

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 34 new commits pushed to the master branch:

  • f88c1c6: 8345773: Class-File API debug printing capability
  • e88e793: 8343148: C2: Refactor uses of "PhaseValue::con() + PhaseIdealLoop::set_ctrl()" into separate method
  • 1e9204f: 8345273: Fix -Wzero-as-null-pointer-constant warnings in s390 code
  • c40140e: 8334581: Remove no-arg constructor BasicSliderUI()
  • 8de0622: 8345767: javax/swing/JSplitPane/4164779/JSplitPaneKeyboardNavigationTest.java fails in ubuntu22.04
  • abcd23f: 8334756: javac crashed on call to non-existent generic method with explicit annotated type arg
  • 2ddaa46: 8305010: Test vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t003/TestDescription.java timed out: thread not suspended
  • c631719: 8343170: java/awt/Cursor/JPanelCursorTest/JPanelCursorTest.java does not show the default cursor
  • 29d648c: 8341781: Improve Min/Max node identities
  • 4c39e9f: 8344924: Default CA certificates loaded despite request to use custom keystore
  • ... and 24 more: https://git.openjdk.org/jdk/compare/166c12771d9d8c466e73a9490c4eb1fc9a5f6c24...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Dec 9, 2024

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

  • hotspot
  • 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 hotspot hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Dec 9, 2024
Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Well, it is not technically a NULL -> nullptr changes we handle with PRs like these, but I guess it is good to have a consistent wording.

Copy link
Contributor

@TheShermanTanker TheShermanTanker left a comment

Choose a reason for hiding this comment

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

Not really sure if just a comment change warrants a Pull Request, but since it is already done and is trivial why not

@SoniaZaldana SoniaZaldana marked this pull request as ready for review December 10, 2024 14:56
@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 10, 2024
@mlbridge
Copy link

mlbridge bot commented Dec 10, 2024

Webrevs

Copy link

@Hamlin-Li Hamlin-Li left a comment

Choose a reason for hiding this comment

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

Looks good.

@SoniaZaldana
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 11, 2024

Going to push as commit e294899.
Since your change was applied there have been 42 commits pushed to the master branch:

  • d381d58: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes
  • 45c914c: 8343607: C2: Shenandoah crashes during barrier expansion in Continuation::enter
  • a21d21f: 8345609: [C1] LIR Operations with one input should be implemented as LIR_Op1
  • 2382a2d: 8345661: Simplify page size alignment in code heap reservation
  • 076bfa6: 8345656: Move os alignment functions out of ReservedSpace
  • 2826838: 8345658: WB_NMTCommitMemory redundantly records an NMT tag
  • c9ec271: 8345800: Update copyright year to 2024 for serviceability in files where it was missed
  • 8e0f929: 8345805: Update copyright year to 2024 for other files where it was missed
  • f88c1c6: 8345773: Class-File API debug printing capability
  • e88e793: 8343148: C2: Refactor uses of "PhaseValue::con() + PhaseIdealLoop::set_ctrl()" into separate method
  • ... and 32 more: https://git.openjdk.org/jdk/compare/166c12771d9d8c466e73a9490c4eb1fc9a5f6c24...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 11, 2024
@openjdk openjdk bot closed this Dec 11, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 11, 2024
@openjdk
Copy link

openjdk bot commented Dec 11, 2024

@SoniaZaldana Pushed as commit e294899.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@kimbarrett
Copy link

Well, it is not technically a NULL -> nullptr changes we handle with PRs like these, but I guess it is good to have a consistent wording.

We've also been changing "NULL" in comments and strings. This avoids having an identifier in those that isn't actually
present in code. Perhaps more importantly, it prepares for JDK-8343802. In comments and strings we sometimes use
"null" and sometimes use "nullptr", depending on whether the context code-like or not.

@kimbarrett
Copy link

Not really sure if just a comment change warrants a Pull Request, but since it is already done and is trivial why not

Any change requires a JBS issue and a PR. Sometimes something simple like this can be folded into another change.

@kimbarrett
Copy link

kimbarrett commented Dec 11, 2024

Unfortunately, this change was incomplete. It missed these:

./share/gc/shenandoah/shenandoahFreeSet.cpp: // Overwrite with non-zero (non-NULL) values only if necessary for allocation bookkeeping.
./share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp: assert(obj->klass() != nullptr, "klass should not be NULL");

In both of those lines, s/NULL/null/

Sorry I didn't point this out before this PR was integrated. I only noticed the PR this morning. Guess we'll need
another JBS issue and PR...

@kimbarrett
Copy link

New JBS issue for the missed cases:
https://bugs.openjdk.org/browse/JDK-8346008

@SoniaZaldana
Copy link
Member Author

Hi @kimbarrett, thanks for taking a look. Apologies for missing those. I can follow up with a PR for the remaining changes.

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

Labels

hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

5 participants