RFR(s): 8153330: deprecate Runtime.traceInstructions & traceMethodCalls for removal
Stuart Marks
stuart.marks at oracle.com
Tue Apr 19 22:11:38 UTC 2016
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 core-libs-dev
mailing list