-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8278423: ExtendedDTraceProbes should be deprecated #7110
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 eme64! A progress list of the required criteria for merging this PR into |
…otspot/share/services/dtraceAttacher.hpp
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 Emanuel,
There are a few changes needed as described in comments below. Also when we deprecate flags we add them to the VMDeprecatedOptions test.
Thanks,
David
@@ -2879,6 +2880,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m | |||
} | |||
} else if (match_option(option, "-XX:+ExtendedDTraceProbes")) { | |||
#if defined(DTRACE_ENABLED) | |||
warning("-XX:+ExtendedDTraceProbes is deprecated. Use a combination of -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes and -XX:+DTraceMonitorProbes instead."); |
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.
Because the flag is deprecated, a deprecation warning will already be generated for it, so this will cause two warnings to be produced. You either put the flag in the special_jvm_flags table and accept the standard deprecation message, or else you don't put it in the table and handle the deprecation (and later obsoletion) warning directly. In this case the direct approach seems best.
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.
@dholmes-ora : The warning is actually not already generated, since this flag is handled separately, the handling is only done if none of the cases matches, and we land in the } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
case.
I had to add the warning separately now. I think this is a bug though, @TobiHartmann thought so too. All options should first be checked if they are deprecated.
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.
Thank you very much, I added the flag to the Test.
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.
@eme64 thanks for that correction - yes I thought we checked all args up front and then processed the specialized logic. The opposite does make some sense though as it means we can use the table and do specialized handling. When the flag is obsoleted we delete the specialized handling.
src/java.base/share/man/java.1
Outdated
@@ -2975,6 +2975,7 @@ different JDK version. | |||
.RE | |||
.TP | |||
.B \f[CB]\-XX:+ExtendedDTraceProbes\f[R] | |||
Deprecated. Use combination of these flags instead: -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes, -XX:+DTraceMonitorProbes |
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.
When a flag is deprecated we move it to the "Deprecated Java Options" section of the manpage.
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.
Thank you @dholmes-ora
/label add hotspot |
/label remove hotspot-runtime |
@eme64 |
@eme64 |
|
Can you replace the use of -XX:+ExtendedDTraceProbes in test/hotspot/jtreg/serviceability/7170638/SDTProbesGNULinuxTest.java with the three new flags ? |
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.
A few more tweaks below.
Thanks,
David
@@ -28,7 +28,6 @@ | |||
#include "runtime/interfaceSupport.inline.hpp" | |||
#include "runtime/os.inline.hpp" | |||
#include "services/attachListener.hpp" | |||
#include "services/dtraceAttacher.hpp" |
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.
These changes are somewhat independent of the deprecation issue and could be split out into a separate RFE. The serviceability folk may have an opinion.
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.
@dholmes-ora Ok, I reverted this and will do it in a separate RFE.
@@ -2879,6 +2880,8 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m | |||
} | |||
} else if (match_option(option, "-XX:+ExtendedDTraceProbes")) { | |||
#if defined(DTRACE_ENABLED) | |||
warning("Option ExtendedDTraceProbes was deprecated in version 19 and will likely be removed in a future release."); | |||
warning("Use a combination of -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes and -XX:+DTraceMonitorProbes instead."); |
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.
s/a/the/
Applies to all three uses.
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.
Agreed, changing it
src/java.base/share/man/java.1
Outdated
@@ -4005,6 +3997,15 @@ Example: | |||
\f[CB]\-Xlog:gc:garbage\-collection.log\f[R] | |||
.RE | |||
.TP | |||
.B \f[CB]\-XX:+ExtendedDTraceProbes\f[R] | |||
Deprecated. Use combination of these flags instead: -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes, -XX:+DTraceMonitorProbes |
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.
Delete "Deprecated" as we are in the deprecated options section.
The wording also needs updating as per the warning text ... though that might read a little odd here so I suggest a tweak:
Use the combination of -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes and -XX:+DTraceMonitorProbes instead of this deprecated flag.
I would also move that new text to the end, so we still describe the flag first (otherwise it again reads a little odd.)
We will also need to add those flags to the "ADVANCED SERVICEABILITY OPTIONS FOR JAVA" section.
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.
@dholmes-ora thanks for the suggestions, I implemented them.
/label add serviceability This is really a serviceability flag, though it only does anything interesting in compiler code these days, so adding serviceability team to emails. |
@dholmes-ora |
…: /src/hotspot/share/services/dtraceAttacher.hpp" This reverts commit 885b985.
Thank you @hseigel , I patched it according to your suggestion. |
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.
Other than the need to update the copyright dates to 2022, these changes look good.
Thanks, Harold
@eme64 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 466 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. 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, @hseigel, @vnkozlov, @TobiHartmann) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
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 Emanuel,
A few minor nits below.
Thanks,
David
@@ -1864,7 +1864,9 @@ const intx ObjectAlignmentInBytes = 8; | |||
"Pause and wait for keypress on exit if a debugger is attached") \ | |||
\ | |||
product(bool, ExtendedDTraceProbes, false, \ | |||
"Enable performance-impacting dtrace probes") \ | |||
"(Deprecated) Enable performance-impacting dtrace probes. " \ | |||
"Use a combination of -XX:+DTraceMethodProbes, " \ |
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.
You missed changing 'a' to 'the' 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.
done
that affect the performance. | ||
By default, this option is disabled and \f[CB]dtrace\f[R] performs only | ||
standard probes. | ||
.B \f[CB]\-XX:+DTraceAllocProbes\f[R] |
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.
The three newly documented flags should all be marked "Linux and macOS". It is somewhat of a poor design that the flags are available on all platforms but only have an effect on systems with DTrace or SystemTap support - which (for our main platforms) is Linux and macOS.
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.
done
src/java.base/share/man/java.1
Outdated
that affect the performance. | ||
By default, this option is disabled and \f[CB]dtrace\f[R] performs only | ||
standard probes. | ||
Use the combination of these flags instead: -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes, -XX:+DTraceMonitorProbes |
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.
The flags should be in a code font (use `-XX:...` in the markdown source).
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.
done
src/java.base/share/man/java.1
Outdated
@@ -4005,6 +4012,15 @@ Example: | |||
\f[CB]\-Xlog:gc:garbage\-collection.log\f[R] | |||
.RE | |||
.TP | |||
.B \f[CB]\-XX:+ExtendedDTraceProbes\f[R] | |||
\f[B]Linux and macOS:\f[R] Enables additional \f[CB]dtrace\f[R] tool probes | |||
that affect the performance. |
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.
Existing grammatical nit: please delete '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.
done
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 updates.
David
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.
Good.
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.
Thanks @dholmes-ora , @vnkozlov , @TobiHartmann @hseigel for the reviews. |
/sponsor |
Going to push as commit 67077a0.
Your commit was automatically rebased without conflicts. |
@dholmes-ora @eme64 Pushed as commit 67077a0. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
@eme64 the test fails in our CI as it encounters builds for which DTrace is not enabled - see JDK-8281675. |
Deprecated ExtendedDTraceProbes.
Edited help messages and man pages accordingly, added the 3 flags to man pages.
Added flag to VMDeprecatedOptions test.
Replaced the flag with 3 flags in SDTProbesGNULinuxTest.java.
Checked that tests are not affected.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7110/head:pull/7110
$ git checkout pull/7110
Update a local copy of the PR:
$ git checkout pull/7110
$ git pull https://git.openjdk.java.net/jdk pull/7110/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 7110
View PR using the GUI difftool:
$ git pr show -t 7110
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7110.diff