changeset 55819:c6498066a0a5

8205131: remove Runtime trace methods Reviewed-by: lancea, rriggs, iklam
author smarks
date Mon, 10 Jun 2019 17:33:11 -0700
parents 040e1c6dab96
children 670b4794f51e
files src/java.base/share/classes/java/lang/Runtime.java test/jaxp/javax/xml/jaxp/unittest/transform/ProcessXSLT.java test/jdk/java/rmi/activation/CommandEnvironment/SetChildEnv.java test/jdk/sun/rmi/log/ReliableLog/Recovery.java
diffstat 4 files changed, 2 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Runtime.java	Mon Jun 10 15:53:35 2019 -0700
+++ b/src/java.base/share/classes/java/lang/Runtime.java	Mon Jun 10 17:33:11 2019 -0700
@@ -684,32 +684,6 @@
     }
 
     /**
-     * Not implemented, does nothing.
-     *
-     * @deprecated
-     * This method was intended to control instruction tracing.
-     * It has been superseded by JVM-specific tracing mechanisms.
-     * This method is subject to removal in a future version of Java SE.
-     *
-     * @param on ignored
-     */
-    @Deprecated(since="9", forRemoval=true)
-    public void traceInstructions(boolean on) { }
-
-    /**
-     * Not implemented, does nothing.
-     *
-     * @deprecated
-     * This method was intended to control method call tracing.
-     * It has been superseded by JVM-specific tracing mechanisms.
-     * This method is subject to removal in a future version of Java SE.
-     *
-     * @param on ignored
-     */
-    @Deprecated(since="9", forRemoval=true)
-    public void traceMethodCalls(boolean on) { }
-
-    /**
      * Loads the native library specified by the filename argument.  The filename
      * argument must be an absolute path name.
      * (for example
--- a/test/jaxp/javax/xml/jaxp/unittest/transform/ProcessXSLT.java	Mon Jun 10 15:53:35 2019 -0700
+++ b/test/jaxp/javax/xml/jaxp/unittest/transform/ProcessXSLT.java	Mon Jun 10 17:33:11 2019 -0700
@@ -145,15 +145,12 @@
    */
     public static void main(String argv[]) {
 
-        // Runtime.getRuntime().traceMethodCalls(false); // turns Java tracing off
         boolean doStackDumpOnError = false;
         boolean doDiag = false;
         boolean setQuietMode = false;
         String msg = null;
         boolean isSecureProcessing = false;
 
-        // Runtime.getRuntime().traceMethodCalls(false);
-        // Runtime.getRuntime().traceInstructions(false);
         /**
          * The default diagnostic writer...
          */
--- a/test/jdk/java/rmi/activation/CommandEnvironment/SetChildEnv.java	Mon Jun 10 15:53:35 2019 -0700
+++ b/test/jdk/java/rmi/activation/CommandEnvironment/SetChildEnv.java	Mon Jun 10 17:33:11 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -123,9 +123,7 @@
                     "WHO INQUIRE ABOUT MY PARENTS.";
 
             System.out.println(complaint);
-            //Runtime.getRuntime().traceMethodCalls(true);
             String res = doctor.complain(complaint);
-            //Runtime.getRuntime().traceMethodCalls(false);
             System.out.println (" => " + res);
 
             // Get debugExec line, allowing 15 seconds for it to flush
--- a/test/jdk/sun/rmi/log/ReliableLog/Recovery.java	Mon Jun 10 15:53:35 2019 -0700
+++ b/test/jdk/sun/rmi/log/ReliableLog/Recovery.java	Mon Jun 10 17:33:11 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,13 +88,7 @@
 
                     Recovery handler = new Recovery();
                     ReliableLog log;
-                    if (size == 4 && deathpoint == 6) {
-                        Runtime.getRuntime().traceMethodCalls(true);
-                    }
                     log = new ReliableLog(dir, handler);
-                    if (size == 4 && deathpoint == 6) {
-                        Runtime.getRuntime().traceMethodCalls(false);
-                    }
 
                     // Generate a number of updates (size - 1) until failing
                     int i;