8386963: [lworld] Improve the exception message from Object synchronization methods on value objects#2568
8386963: [lworld] Improve the exception message from Object synchronization methods on value objects#2568jaikiran wants to merge 4 commits into
Conversation
…zation methods on value objects
|
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
|
@jaikiran 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: 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the 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 (@dholmes-ora) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
| @@ -321,14 +321,24 @@ static bool _no_progress_skip_increment = false; | |||
| if ((obj)->mark().is_inline_type()) { \ | |||
| JavaThread* THREAD = current; \ | |||
| ResourceMark rm(THREAD); \ | |||
There was a problem hiding this comment.
Is the RM still needed?
There was a problem hiding this comment.
I wasn't aware what a ResourceMark is. Reading the code and the code comment on ResourceMarkImpl, I believe it was here for tracking the resource allocated in the implementation of obj->klass()->external_name() (please correct me if I'm wrong). With that now gone, I think the ResourceMark is no longer needed. I've updated the PR accordingly.
I have triggered tier testing to be sure that this doesn't cause any issues.
There was a problem hiding this comment.
tier1, tier2, tier3 testing of the latest changes in this PR completed without any related failures.
|
There's been some discussion on whether to throw an I don't have any more changes planned for this PR. The change here will merely improve the exception message contained in the The other change in this PR is the removal of |
dholmes-ora
left a comment
There was a problem hiding this comment.
This seems fine to me. The ResourceMarks are no longer needed.
|
Thank you David and Alan for the reviews. |
|
/integrate |
|
/sponsor |
|
Going to push as commit 6f7797c.
Your commit was automatically rebased without conflicts. |
Can I please get a review of this change which proposes to improve the exception message in
IllegalMonitorStateExceptionwhen it gets thrown for value objects?With this change, we now report the following exception message when value objects are used to invoke
Object.wait()and related methods:There were some thoughts about using an exception message of the form
Exception java.lang.IllegalMonitorStateException: object's type java.lang.Integer is not an identity class. But since value objects cannot be synchronized upon, we decided it would be fine (and accurate) to reuse the same "current thread is not owner" exception message that we use for identity objects.Given the nature of this change, I haven't added any new jtreg tests for this. Existing tests in tier1, tier2 and tier3 continue to pass after this change.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2568/head:pull/2568$ git checkout pull/2568Update a local copy of the PR:
$ git checkout pull/2568$ git pull https://git.openjdk.org/valhalla.git pull/2568/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2568View PR using the GUI difftool:
$ git pr show -t 2568Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2568.diff
Using Webrev
Link to Webrev Comment