RFR: 8278423: ExtendedDTraceProbes should be deprecated [v2]

David Holmes dholmes at openjdk.java.net
Tue Jan 18 13:26:24 UTC 2022


On Tue, 18 Jan 2022 11:29:46 GMT, Emanuel Peter <duke at openjdk.java.net> wrote:

>> Deprecated ExtendedDTraceProbes.
>> Edited help messages and man pages accordingly.
>> Removed `/src/hotspot/share/services/dtraceAttacher.hpp`: only contained declarations that are never defined or used.
>> 
>> Checked that tests are not affected.
>
> Emanuel Peter has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Mode of speech edit
>  - Fix formatting issue

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

src/hotspot/share/runtime/arguments.cpp line 2883:

> 2881:     } else if (match_option(option, "-XX:+ExtendedDTraceProbes")) {
> 2882: #if defined(DTRACE_ENABLED)
> 2883:       warning("-XX:+ExtendedDTraceProbes is deprecated. Use a combination of -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes and -XX:+DTraceMonitorProbes instead.");

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.

src/java.base/share/man/java.1 line 2978:

> 2976: .TP
> 2977: .B \f[CB]\-XX:+ExtendedDTraceProbes\f[R]
> 2978: Deprecated. Use combination of these flags instead: -XX:+DTraceMethodProbes, -XX:+DTraceAllocProbes, -XX:+DTraceMonitorProbes

When a flag is deprecated we move it to the "Deprecated Java Options" section of the manpage.

-------------

Changes requested by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7110


More information about the hotspot-runtime-dev mailing list