-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8295697: Resolve conflicts between serviceability/jvmti and nsk/jvmti shared code #10733
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
Conversation
|
👋 Welcome back amenkov! A progress list of the required criteria for merging this PR into |
|
@alexmenkov The following label will be automatically applied to this pull request:
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. |
Webrevs
|
lmesnik
left a comment
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.
There is a lib ~/ws/jdk/open/test/lib/jdk/test/lib/jvmti/jvmti_common.h which has print_stack_trace. Could it be re-used instead?
| jvmti->Deallocate((unsigned char*)methodSig); | ||
| } | ||
|
|
||
| static void printStackTrace(jvmtiEnv *jvmti, jthread thread) { |
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.
We normally use C naming convention for function names.
The exception is JVMTI event call backs.
For serviceability/jvmti tests we already have this:
test/lib/jdk/test/lib/jvmti/jvmti_common.h
You can check for print_stack_trace() function there.
It depends on a couple of other library functions though.
Unfortunately, we do not have such utility functions for nsk tests.
We may want something similar for nsk/jvmti tests.
If so, then it is better, at least, to keep the same function names and signatures if possible.
It'd make sense to check with Leonid on what approach to take.
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.
Most of this code seems to have been copied from Java_nsk_jvmti_GetStackTrace_getstacktr001_check. Maybe some consolidating would be good.
|
Thank you for review. jvmti_common.h contains both declaration and definitions, NSK shared files have separate .h and .cpp files (.cpp files are included in test .cpp files) This 2 "libraries" have some duplicate functions and cannot be used simultaneously (a number of compiler errors). |
|
Sounds good to me. We could reuse print_frame after this. |
|
Nice plan, thanks! |
|
|
I think the cleanup is disruptive enough that it should be a separate PR. Probably the easiest approach is to file a new CR for the cleanup and repurpose this PR for it, which means also moving the popframe004.cpp changes to a new PR. |
| * Declared and defined in jvmti_common.h | ||
| */ | ||
| char *jlong_to_string(jlong value, char *string); | ||
| //char *jlong_to_string(jlong value, char *string); |
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.
It seems odd to have jlong_to_string and julong_to_string implemented in different places. Maybe more cleanup is needed here.
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.
I'd suggest to move julong_to_string to the same place where the jlong_to_string is placed and remove all these with the comments from jni_tools.
I agree, we may need to file a separate bug for global cleanup which should get rid of JVMTITools.*.
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.
I moved julong_to_string (and define for julong type) to jvmti_common.h
About JVMTITools.*
JVMTITools.cpp is included in 628 tests, JVMTITools.h is included in 348 files.
I don't think removing this 2 files worth such massive change
sspitsyn
left a comment
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.
Looks good to me.
Thank you for the update.
Serguei
|
@alexmenkov 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 75 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 |
plummercj
left a comment
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.
Looks good!
|
/integrate |
|
Going to push as commit 6240431.
Your commit was automatically rebased without conflicts. |
|
@alexmenkov Pushed as commit 6240431. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The fix resolved conflicts between jvmti test shared code: test/lib/jdk/test/lib/jvmti/jvmti_common.h and test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/* to allot NSK tests to use jvmti_common.h
testing: test native libraries are built before any test execution, so run build job should be enough, but for safety I also run test/hotspot/jtreg/vmTestbase/nsk/jvmti and test/hotspot/jtreg/serviceability/jvmti
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10733/head:pull/10733$ git checkout pull/10733Update a local copy of the PR:
$ git checkout pull/10733$ git pull https://git.openjdk.org/jdk pull/10733/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10733View PR using the GUI difftool:
$ git pr show -t 10733Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10733.diff