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

8297864: Dead code elimination #11439

Closed
wants to merge 54 commits into from
Closed

8297864: Dead code elimination #11439

wants to merge 54 commits into from

Conversation

robehn
Copy link
Contributor

@robehn robehn commented Nov 30, 2022

Please consider removing all this dead code.
I did not have any good way of splitting this up and I did not see any benefit is just splitting it up 'just because'.
There is one commit per file couple.
Not much else to say, passes t1-4 and I can build:
linux-aarch64-debug,linux-arm32-debug,linux-ppc64le-debug,linux-s390x-debug,linux-x86,linux-x86-debug,macosx-aarch64-debug,macosx-x64,macosx-x64-debug,windows-x64-debug,windows-x86-debug and zero-x64-debug
Some of them I also built release.


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

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11439

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 30, 2022

👋 Welcome back rehn! 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 Nov 30, 2022

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

  • hotspot
  • serviceability

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 serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Nov 30, 2022
@robehn
Copy link
Contributor Author

robehn commented Nov 30, 2022

/label remove serviceability

@openjdk openjdk bot removed the serviceability serviceability-dev@openjdk.org label Nov 30, 2022
@openjdk
Copy link

openjdk bot commented Nov 30, 2022

@robehn
The serviceability label was successfully removed.

@robehn robehn force-pushed the dead-code branch 3 times, most recently from 12da0c8 to 4dd56f2 Compare December 1, 2022 10:16
@robehn robehn marked this pull request as ready for review December 1, 2022 12:56
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 1, 2022
@mlbridge
Copy link

mlbridge bot commented Dec 1, 2022

Webrevs

Copy link
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

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

I agree, splitting this up would just waste time. Please run this tool more often! I see some things I should have removed in here, and some things that were proactively added can be added when there's code to use them.
Looks wonderful. Will make the code easier to maintain.

@openjdk
Copy link

openjdk bot commented Dec 1, 2022

@robehn 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:

8297864: Dead code elimination

Reviewed-by: coleenp, pchilanomate

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 36 new commits pushed to the master branch:

  • 6065696: 8297982: Exclude vmTestbase/nsk/monitoring/stress/lowmem/ with ZGC until 8297979 is fixed
  • 415cfd2: 8297285: Shenandoah pacing causes assertion failure during VM initialization
  • df07255: 8297984: Turn on warnings as errors for javadoc
  • 227364d: 8297953: Fix several C2 IR matching tests for RISC-V
  • 1370228: 8297941: Add override modifier in space.hpp
  • 319faa5: 8296084: javax/swing/JSpinner/4788637/bug4788637.java fails intermittently on a VM
  • b73363f: 8297686: JFR: Improve documentation of EventStream::onMetadata(Consumer)
  • 1376f33: 8297911: Memory leak in JfrUpcalls::on_retransform
  • 5c0ff26: 8291444: GHA builds/tests won't run manually if disabled from automatic running
  • 6d0fbb2: 8297645: Drop the test/jdk/java/net/httpclient/reactivestreams-tck-tests/TckDriver.java test
  • ... and 26 more: https://git.openjdk.org/jdk/compare/794114787b03e2a89ce7343b4fad94bb61494f94...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 openjdk bot added the ready Pull request is ready to be integrated label Dec 1, 2022
Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Hmm I think this warrants closer inspection to ensure there isn't a bug because something is unused (e.g. is_in_asgct() code in forte.cpp).

Also IIRC Loom knowingly integrated a lot of code that will only come in to play in future previews and so it may not be appropriate to cull it now. Perhaps @pchilano can comment?

@robehn
Copy link
Contributor Author

robehn commented Dec 2, 2022

Hmm I think this warrants closer inspection to ensure there isn't a bug because something is unused (e.g. is_in_asgct() code in forte.cpp).

Maybe this flag was read by solaris studio or so, way back. No readers today.

Also IIRC Loom knowingly integrated a lot of code that will only come in to play in future previews and so it may not be appropriate to cull it now. Perhaps @pchilano can comment?

The code is still in loom/fibers, when they merge with mainline they can choice to keep it in loom/fiber.
When they have new code using it, it will part of integrating that.

@pchilano
Copy link
Contributor

pchilano commented Dec 2, 2022

Hmm I think this warrants closer inspection to ensure there isn't a bug because something is unused (e.g. is_in_asgct() code in forte.cpp).

Also IIRC Loom knowingly integrated a lot of code that will only come in to play in future previews and so it may not be appropriate to cull it now. Perhaps @pchilano can comment?

I took a look at the Loom related dead code. I see it's mostly just unused short helper methods, but other than that don't see any removal that would add complexity with future work. If some of those actually turn out to be useful we can bring them back with the related change.

Copy link
Contributor

@pchilano pchilano 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 to me!

Thanks,
Patricio

@robehn
Copy link
Contributor Author

robehn commented Dec 2, 2022

Thanks @coleenp and @pchilano !

@dholmes-ora
Copy link
Member

FTR: The is_in_asgct dead code was created by "JDK-8290025: Remove the Sweeper"

@robehn
Copy link
Contributor Author

robehn commented Dec 5, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Dec 5, 2022

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

  • 777fb52: 8297974: ClassCastException in com.sun.tools.javac.comp.AttrRecover.doRecovery
  • 17666fb: 8297794: Deprecate JMX Management Applets for Removal
  • 619b68c: 8294540: Remove Opaque2Node: it is broken and triggers assert
  • 82561de: 8296384: [TESTBUG] sun/security/provider/SecureRandom/AbstractDrbg/SpecTest.java intermittently timeout
  • 61b7093: 8297872: Non-local G1MonotonicArenaFreePool::_freelist_pool has non-trivial ctor/dtor
  • 3b3bbe5: 8296907: VMError: add optional callstacks, siginfo for secondary errors
  • a573923: 8297264: C2: Cast node is not processed again in CCP and keeps a wrong too narrow type which is later replaced by top
  • b49fd92: 8298055: AArch64: fastdebug build fails after JDK-8247645
  • 914ef07: 8297609: Add application/wasm MIME type for wasm file extension
  • a71d91b: 8298067: Persistent test failures after 8296012
  • ... and 46 more: https://git.openjdk.org/jdk/compare/794114787b03e2a89ce7343b4fad94bb61494f94...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 5, 2022

@robehn Pushed as commit d523d9d.

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

@robehn robehn deleted the dead-code branch December 5, 2022 10:42
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
4 participants