changeset 39467:4fa628bbb108

8159590: Remove deprecated methods from jdk.internal.misc.VM Reviewed-by: chegar, dholmes
author redestad
date Tue, 21 Jun 2016 12:05:23 +0200
parents 838ae1e90961
children 04d84adee123
files jdk/src/java.base/share/classes/java/lang/ThreadGroup.java jdk/src/java.base/share/classes/jdk/internal/misc/VM.java
diffstat 2 files changed, 0 insertions(+), 120 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java	Mon Jun 20 08:49:40 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java	Tue Jun 21 12:05:23 2016 +0200
@@ -60,7 +60,6 @@
     int maxPriority;
     boolean destroyed;
     boolean daemon;
-    boolean vmAllowSuspension;
 
     int nUnstartedThreads = 0;
     int nthreads;
@@ -121,7 +120,6 @@
         this.name = name;
         this.maxPriority = parent.maxPriority;
         this.daemon = parent.daemon;
-        this.vmAllowSuspension = parent.vmAllowSuspension;
         this.parent = parent;
         parent.add(this);
     }
@@ -1075,10 +1073,6 @@
      */
     @Deprecated(since="1.2")
     public boolean allowThreadSuspension(boolean b) {
-        this.vmAllowSuspension = b;
-        if (!b) {
-            VM.unsuspendSomeThreads();
-        }
         return true;
     }
 
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/VM.java	Mon Jun 20 08:49:40 2016 -0700
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/VM.java	Tue Jun 21 12:05:23 2016 +0200
@@ -30,120 +30,6 @@
 
 public class VM {
 
-    /* The following methods used to be native methods that instruct
-     * the VM to selectively suspend certain threads in low-memory
-     * situations. They are inherently dangerous and not implementable
-     * on native threads. We removed them in JDK 1.2. The skeletons
-     * remain so that existing applications that use these methods
-     * will still work.
-     */
-    private static boolean suspended = false;
-
-    /** @deprecated */
-    @Deprecated
-    public static boolean threadsSuspended() {
-        return suspended;
-    }
-
-    @SuppressWarnings("deprecation")
-    public static boolean allowThreadSuspension(ThreadGroup g, boolean b) {
-        return g.allowThreadSuspension(b);
-    }
-
-    /** @deprecated */
-    @Deprecated
-    public static boolean suspendThreads() {
-        suspended = true;
-        return true;
-    }
-
-    // Causes any suspended threadgroups to be resumed.
-    /** @deprecated */
-    @Deprecated
-    public static void unsuspendThreads() {
-        suspended = false;
-    }
-
-    // Causes threadgroups no longer marked suspendable to be resumed.
-    /** @deprecated */
-    @Deprecated
-    public static void unsuspendSomeThreads() {
-    }
-
-    /* Deprecated fields and methods -- Memory advice not supported in 1.2 */
-
-    /** @deprecated */
-    @Deprecated
-    public static final int STATE_GREEN = 1;
-
-    /** @deprecated */
-    @Deprecated
-    public static final int STATE_YELLOW = 2;
-
-    /** @deprecated */
-    @Deprecated
-    public static final int STATE_RED = 3;
-
-    /** @deprecated */
-    @Deprecated
-    public static final int getState() {
-        return STATE_GREEN;
-    }
-
-    /** @deprecated */
-    @Deprecated
-    public static void registerVMNotification(VMNotification n) { }
-
-    /** @deprecated */
-    @Deprecated
-    public static void asChange(int as_old, int as_new) { }
-
-    /** @deprecated */
-    @Deprecated
-    public static void asChange_otherthread(int as_old, int as_new) { }
-
-    /*
-     * Not supported in 1.2 because these will have to be exported as
-     * JVM functions, and we are not sure we want do that. Leaving
-     * here so it can be easily resurrected -- just remove the //
-     * comments.
-     */
-
-    /**
-     * Resume Java profiling.  All profiling data is added to any
-     * earlier profiling, unless <code>resetJavaProfiler</code> is
-     * called in between.  If profiling was not started from the
-     * command line, <code>resumeJavaProfiler</code> will start it.
-     * <p>
-     *
-     * NOTE: Profiling must be enabled from the command line for a
-     * java.prof report to be automatically generated on exit; if not,
-     * writeJavaProfilerReport must be invoked to write a report.
-     *
-     * @see     resetJavaProfiler
-     * @see     writeJavaProfilerReport
-     */
-
-    // public native static void resumeJavaProfiler();
-
-    /**
-     * Suspend Java profiling.
-     */
-    // public native static void suspendJavaProfiler();
-
-    /**
-     * Initialize Java profiling.  Any accumulated profiling
-     * information is discarded.
-     */
-    // public native static void resetJavaProfiler();
-
-    /**
-     * Write the current profiling contents to the file "java.prof".
-     * If the file already exists, it will be overwritten.
-     */
-    // public native static void writeJavaProfilerReport();
-
-
     // the init level when the VM is fully initialized
     private static final int JAVA_LANG_SYSTEM_INITED     = 1;
     private static final int MODULE_SYSTEM_INITED        = 2;