-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8289612: Change hotspot/jtreg tests to not use Thread.stop #9505
Conversation
👋 Welcome back lmesnik! A progress list of the required criteria for merging this PR into |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Leonid,
Can we avoid all the agent stuff by defining a JVMTI helper class in the test library:
public class JVMTI {
private native void stopThread(Thread t, Throwable ex);
public void stopThread(Thread t) {
stopThread(t, new ThreadDeath());
}
}
And in cpp file just use GetEnv to get JVMTIEnv and call stopThread?
Otherwise the conversions seem quite reasonable.
Thanks.
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java
Show resolved
Hide resolved
Thanks for doing this. I agree with David that AsyncExceptionOnMonitorEnter AsyncExceptionTest doesn't really need to be started with -agentlib. The can_signal_thread capability can be obtained in the alive phase so JNI code can obtain a JVMTI environment and add this capability. |
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments/observations.
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed stopThread using and other comments (or replied to them).
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the library update -looks good!
A couple of minor typo "targets of opportunity" listed below.
One discussion still somewhat open.
Thanks.
test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java
Outdated
Show resolved
Hide resolved
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java
Show resolved
Hide resolved
@lmesnik 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 26 new commits pushed to the
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thumbs up. Did you decide that it was okay if the mallocWithGC2.java
test didn't wait for the cHeapEater thread to finish?
Yep, the goal of this thread is just to call malloc/free in the cycle. Doesn't need to wait for completion. |
/integrate |
Going to push as commit 5a96a5d.
Your commit was automatically rebased without conflicts. |
The tests are updated to don't use Thread.stop(). Tests whose intention is to verify async exception updated to use jvmti StopThread.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9505/head:pull/9505
$ git checkout pull/9505
Update a local copy of the PR:
$ git checkout pull/9505
$ git pull https://git.openjdk.org/jdk pull/9505/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9505
View PR using the GUI difftool:
$ git pr show -t 9505
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9505.diff