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

JDK-8310316: Failing HotSpot Compiler directives are too verbose #14957

Conversation

enothum
Copy link
Contributor

@enothum enothum commented Jul 20, 2023

Previously jcmd printed the whole file if a compiler directive was added that was not in json format. This example illustrates the issue:

./jcmd 331311 Compiler.directives_add ./example.txt
331311:
Syntax error on line 1 byte 1: Json must start with an object or an array.
  At 'This'.
This is my very interesting text,
followed by some more exciting text.

Parsing of compiler directives failed
Could not load file: ./example.txt

The json error message is not printed if the silent field is set in the DirectivesParser object.
The proposed change adds a boolean parameter silent that is propagated from CompilerDirectivesAddDCmd::execute to the DirectivesParser constructor. The default value for the new parameter is set to false, which represents the original behavior. In case where a compiler directive is added, the parameter is set to true and the error message will be reduced.

The proposed change reduces the error message to:

./jcmd 335703 Compiler.directives_add ./example.txt
335703:
Parsing of compiler directives failed
Could not load file: ./example.txt

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-8310316: Failing HotSpot Compiler directives are too verbose (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14957

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 20, 2023

👋 Welcome back enothum! 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 Jul 20, 2023

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

  • hotspot

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.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Jul 20, 2023
@enothum enothum marked this pull request as ready for review July 21, 2023 12:36
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 21, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 21, 2023

Webrevs

@dcubed-ojdk
Copy link
Member

Redirecting to the proper label:

/label remove hotspot
/label add hotspot-compiler

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label Jul 21, 2023
@openjdk
Copy link

openjdk bot commented Jul 21, 2023

@dcubed-ojdk
The hotspot label was successfully removed.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jul 21, 2023
@openjdk
Copy link

openjdk bot commented Jul 21, 2023

@dcubed-ojdk
The hotspot-compiler label was successfully added.

Copy link
Member

@TobiHartmann TobiHartmann 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.

@openjdk
Copy link

openjdk bot commented Jul 24, 2023

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

8310316: Failing HotSpot Compiler directives are too verbose

Reviewed-by: thartmann, chagedorn

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

  • f3ade38: 8308593: Add Keepalive Extended Socket Options Support for Windows
  • ab821aa: 6442919: JFilechooser popup still left-to-right when JFilechooser is set to right-to-left
  • 0328886: 8311955: c++filt is now ibm-llvm-cxxfilt when using xlc17 / clang on AIX
  • 0487aa6: 8312530: Problemlist runtime/os/TestTrimNative.java
  • 8d1ab57: 8301341: LinkedTransferQueue does not respect timeout for poll()
  • bfa76df: 8311978: Shenandoah: Create abstraction over heap metrics for heuristics
  • 3c644dc: 8312044: Simplify toolkit Builder/Writer world
  • f4ba7b2: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final
  • d55d7e8: 8136895: Writer not closed with disk full error, file resource leaked
  • 8042a50: 8309305: sun/security/ssl/SSLSocketImpl/BlockedAsyncClose.java fails with jtreg test timeout
  • ... and 15 more: https://git.openjdk.org/jdk/compare/8d29329138d44800ee4c0c02dacc01a06097de66...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TobiHartmann, @chhagedorn) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 24, 2023
Copy link
Member

@chhagedorn chhagedorn 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, too!

@enothum
Copy link
Contributor Author

enothum commented Jul 24, 2023

Thanks everyone for the reviews :)

@enothum
Copy link
Contributor Author

enothum commented Jul 24, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 24, 2023
@openjdk
Copy link

openjdk bot commented Jul 24, 2023

@enothum
Your change (at version 1844781) is now ready to be sponsored by a Committer.

@TobiHartmann
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 24, 2023

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

  • f3ade38: 8308593: Add Keepalive Extended Socket Options Support for Windows
  • ab821aa: 6442919: JFilechooser popup still left-to-right when JFilechooser is set to right-to-left
  • 0328886: 8311955: c++filt is now ibm-llvm-cxxfilt when using xlc17 / clang on AIX
  • 0487aa6: 8312530: Problemlist runtime/os/TestTrimNative.java
  • 8d1ab57: 8301341: LinkedTransferQueue does not respect timeout for poll()
  • bfa76df: 8311978: Shenandoah: Create abstraction over heap metrics for heuristics
  • 3c644dc: 8312044: Simplify toolkit Builder/Writer world
  • f4ba7b2: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final
  • d55d7e8: 8136895: Writer not closed with disk full error, file resource leaked
  • 8042a50: 8309305: sun/security/ssl/SSLSocketImpl/BlockedAsyncClose.java fails with jtreg test timeout
  • ... and 15 more: https://git.openjdk.org/jdk/compare/8d29329138d44800ee4c0c02dacc01a06097de66...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 24, 2023
@openjdk openjdk bot closed this Jul 24, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jul 24, 2023
@openjdk
Copy link

openjdk bot commented Jul 24, 2023

@TobiHartmann @enothum Pushed as commit 04f39e1.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
4 participants