8278423: ExtendedDTraceProbes should be deprecated#7110
8278423: ExtendedDTraceProbes should be deprecated#7110eme64 wants to merge 12 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back eme64! A progress list of the required criteria for merging this PR into |
…otspot/share/services/dtraceAttacher.hpp
Webrevs
|
dholmes-ora
left a comment
There was a problem hiding this comment.
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
| } | ||
| } 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.
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.
@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.
Thank you very much, I added the flag to the Test.
There was a problem hiding this comment.
@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
| .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.
When a flag is deprecated we move it to the "Deprecated Java Options" section of the manpage.
|
/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 ? |
dholmes-ora
left a comment
There was a problem hiding this comment.
A few more tweaks below.
Thanks,
David
| #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.
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.
@dholmes-ora Ok, I reverted this and will do it in a separate RFE.
| } 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.
s/a/the/
Applies to all three uses.
src/java.base/share/man/java.1
Outdated
| .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.
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.
@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. |
hseigel
left a comment
There was a problem hiding this comment.
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 |
dholmes-ora
left a comment
There was a problem hiding this comment.
Hi Emanuel,
A few minor nits below.
Thanks,
David
| 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.
You missed changing 'a' to 'the' here.
| 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.
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.
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.
The flags should be in a code font (use `-XX:...` in the markdown source).
src/java.base/share/man/java.1
Outdated
| .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.
Existing grammatical nit: please delete 'the'.
dholmes-ora
left a comment
There was a problem hiding this comment.
Thanks for the updates.
David
|
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
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7110/head:pull/7110$ git checkout pull/7110Update a local copy of the PR:
$ git checkout pull/7110$ git pull https://git.openjdk.java.net/jdk pull/7110/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 7110View PR using the GUI difftool:
$ git pr show -t 7110Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7110.diff