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

8244669: convert clhsdb "mem" command from javascript to java #6902

Closed
wants to merge 6 commits into from

Conversation

plummercj
Copy link
Contributor

@plummercj plummercj commented Dec 21, 2021

clhsdb lost support for the "mem" command when javascript support was removed from SA. This PR is re-adding it by implementing it in Java. The description of the CR contains all the details.

Regarding the clhsdb.html changes for the "examine" command, they are just correctly specifying the existing syntax. No change was actually made to the syntax.

The changes made to the "examine" command are part of a consolidation effort to better share code between "examine" and "mem". "examine" has no functional changes.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8244669: convert clhsdb "mem" command from javascript to java

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6902/head:pull/6902
$ git checkout pull/6902

Update a local copy of the PR:
$ git checkout pull/6902
$ git pull https://git.openjdk.java.net/jdk pull/6902/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6902

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6902.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 21, 2021

👋 Welcome back cjplummer! 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 openjdk bot added the rfr Pull request is ready for review label Dec 21, 2021
@openjdk
Copy link

openjdk bot commented Dec 21, 2021

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

  • serviceability

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 serviceability serviceability-dev@openjdk.org label Dec 21, 2021
@mlbridge
Copy link

mlbridge bot commented Dec 21, 2021

Webrevs

…ys allowed some extra lower case letters at the end of the pattern that just get ignored. I removed support for this since sometimes it resulted in bad address ranges producing an exception rather than a usage() message.
}
} else {
out.println();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it is possible to simplify the above fragment at 549-560 with something like:
if (verbose) {
// If we know what this is a pointer to, then print additional information.
PointerLocation loc = PointerFinder.find(val);
if (!loc.isUnknown()) {
out.print(" ");
loc.printOn(out, false, false); // make it print without line end or ignore there is an extra end?
}
}
out.println();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

printOn() always prints a newline. It's hard to make it not do that since it relies on other print APIs, some of which print newlines and some of which don't (in which case printOn() will print a newline). So I can't easily just create a printOn() variant that doesn't print newlines, and printing two newlines would introduce a bunch of blank lines in the output, which wouldn't look good.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, thanks.

/* The following is from a field in the Method object. */
"In interpreter codelet: method entry point"));
runTest(withCore, cmds, expStrMap);

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a test case for another variant of range: Address,Address ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. We really never had any specific test cases for examine. ClhsdbFindPC does make use of it, but not for the addr,addr variant, so it was also omitted for mem. I did consider adding a test case for it and still can. I started down that path, but adding an incremental value to a hex String was getting a bit ugly, so I abandoned it.

@openjdk
Copy link

openjdk bot commented Dec 21, 2021

@plummercj this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout 8244669-mem
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Dec 21, 2021
Copy link
Member

@poonamparhar poonamparhar 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 Dec 22, 2021

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

8244669: convert clhsdb "mem" command from javascript to java

Reviewed-by: sspitsyn, kevinw, poonam

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Dec 22, 2021
@plummercj
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 22, 2021

Going to push as commit eaefb1a.
Since your change was applied there has been 1 commit pushed to the master branch:

  • d64820d: 8209398: sun/security/pkcs11/KeyStore/SecretKeysBasic.sh failed with "PKCS11Exception: CKR_ATTRIBUTE_SENSITIVE"

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 22, 2021

@plummercj Pushed as commit eaefb1a.

💡 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
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

4 participants