Fwd: RFR(s): 8153330: deprecate Runtime.traceInstructions & traceMethodCalls for removal
David Holmes
david.holmes at oracle.com
Tue Apr 19 23:59:34 UTC 2016
Hi Stuart,
On 20/04/2016 8:21 AM, Stuart Marks wrote:
> I just posted this to core-libs-dev, and I figured I should run this by
> Hotspot-land. There isn't any double-secret-intrinsic magic that Hotspot
> does with these methods, is there? Anybody see any issue with
> deprecating and eventually removing these methods?
I can't see any references in hotspot.
Dasvid
> They won't be removed immediately, but the proposal is to deprecate them
> in JDK 9, marked for removal in a future release.
>
> Thanks,
>
> s'marks
>
>
> -------- Forwarded Message --------
> Subject: RFR(s): 8153330: deprecate Runtime.traceInstructions &
> traceMethodCalls for removal
> Date: Tue, 19 Apr 2016 15:11:38 -0700
> From: Stuart Marks <stuart.marks at oracle.com>
> To: core-libs-dev <core-libs-dev at openjdk.java.net>
>
> Hi all,
>
> I missed a couple bits of cruft in the previous round of java.lang
> deprecations:
> the Runtime.traceInstructions() and traceMethodCalls() methods.
>
> Their implementations are empty. That is, they do absolutely nothing.
>
> They're only mentioned a couple times in the JDK, in CORBA (!) and in
> some RMI
> tests (!), and in a few symbol files. On grepcode.com, there are a
> couple uses,
> mainly attempting to enable these in response to some debugging flag
> being given.
>
> Thus, I propose these be deprecated for removal. Please review diff below.
>
> Thanks,
>
> s'marks
>
>
>
> diff -r 92280897299f src/java.base/share/classes/java/lang/Runtime.java
> --- a/src/java.base/share/classes/java/lang/Runtime.java Mon Apr 18
> 14:10:14
> 2016 -0700
> +++ b/src/java.base/share/classes/java/lang/Runtime.java Tue Apr 19
> 15:04:25
> 2016 -0700
> @@ -718,41 +718,27 @@
> }
>
> /**
> - * Enables/Disables tracing of instructions.
> - * If the {@code boolean} argument is {@code true}, this
> - * method suggests that the Java virtual machine emit debugging
> - * information for each instruction in the virtual machine as it
> - * is executed. The format of this information, and the file or other
> - * output stream to which it is emitted, depends on the host
> environment.
> - * The virtual machine may ignore this request if it does not support
> - * this feature. The destination of the trace output is system
> - * dependent.
> - * <p>
> - * If the {@code boolean} argument is {@code false}, this
> - * method causes the virtual machine to stop performing the
> - * detailed instruction trace it is performing.
> - *
> - * @param on {@code true} to enable instruction tracing;
> - * {@code false} to disable this feature.
> + * Not implemented.
> + *
> + * @deprecated
> + * This method was intended to control instruction tracing.
> + * It has been superseded by JVM-specific tracing mechanisms.
> + *
> + * @param on ignored
> */
> + @Deprecated(since="9", forRemoval=true)
> public void traceInstructions(boolean on) { }
>
> /**
> - * Enables/Disables tracing of method calls.
> - * If the {@code boolean} argument is {@code true}, this
> - * method suggests that the Java virtual machine emit debugging
> - * information for each method in the virtual machine as it is
> - * called. The format of this information, and the file or other
> output
> - * stream to which it is emitted, depends on the host environment. The
> - * virtual machine may ignore this request if it does not support
> - * this feature.
> - * <p>
> - * Calling this method with argument false suggests that the
> - * virtual machine cease emitting per-call debugging information.
> - *
> - * @param on {@code true} to enable instruction tracing;
> - * {@code false} to disable this feature.
> + * Not implemented.
> + *
> + * @deprecated
> + * This method was intended to control method call tracing.
> + * It has been superseded by JVM-specific tracing mechanisms.
> + *
> + * @param on ignored
> */
> + @Deprecated(since="9", forRemoval=true)
> public void traceMethodCalls(boolean on) { }
>
> /**
>
>
>
More information about the hotspot-dev
mailing list