Java 类sun.misc.GC 实例源码

项目:OpenJSharp    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:OpenJSharp    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:jdk8u-jdk    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:jdk8u-jdk    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:jdk8u_jdk    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:jdk8u_jdk    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:infobip-open-jdk-8    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:infobip-open-jdk-8    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:jdk8u-dev-jdk    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:jdk8u-dev-jdk    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:jdk7-jdk    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:jdk7-jdk    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = (EndpointEntry) endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:openjdk-source-code-learn    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:openjdk-source-code-learn    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = (EndpointEntry) endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:OLD-OpenJDK8    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:OLD-OpenJDK8    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:openjdk-jdk7u-jdk    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:openjdk-jdk7u-jdk    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}
项目:openjdk-icedtea7    文件:ObjectTable.java   
/**
 * Increments the "keep-alive count".
 *
 * The "keep-alive count" is the number of non-permanent remote objects
 * that are either in the object table or still have calls in progress.
 * Therefore, this method should be invoked exactly once for every
 * non-permanent remote object exported (a remote object must be
 * exported before it can have any calls in progress).
 *
 * The VM is "kept alive" while the keep-alive count is greater than
 * zero; this is accomplished by keeping a non-daemon thread running.
 *
 * Because non-permanent objects are those that can be garbage
 * collected while exported, and thus those for which the "reaper"
 * thread operates, the reaper thread also serves as the non-daemon
 * VM keep-alive thread; a new reaper thread is created if necessary.
 */
static void incrementKeepAliveCount() {
    synchronized (keepAliveLock) {
        keepAliveCount++;

        if (reaper == null) {
            reaper = AccessController.doPrivileged(
                new NewThreadAction(new Reaper(), "Reaper", false));
            reaper.start();
        }

        /*
         * While there are non-"permanent" objects in the object table,
         * request a maximum latency for inspecting the entire heap
         * from the local garbage collector, to place an upper bound
         * on the time to discover remote objects that have become
         * unreachable (and thus can be removed from the table).
         */
        if (gcLatencyRequest == null) {
            gcLatencyRequest = GC.requestLatency(gcInterval);
        }
    }
}
项目:openjdk-icedtea7    文件:DGCClient.java   
/**
 * Look up the EndpointEntry for the given Endpoint.  An entry is
 * created if one does not already exist.
 */
public static EndpointEntry lookup(Endpoint ep) {
    synchronized (endpointTable) {
        EndpointEntry entry = endpointTable.get(ep);
        if (entry == null) {
            entry = new EndpointEntry(ep);
            endpointTable.put(ep, entry);
            /*
             * While we are tracking live remote references registered
             * in this VM, request a maximum latency for inspecting the
             * entire heap from the local garbage collector, to place
             * an upper bound on the time to discover remote references
             * that have become unreachable (see bugid 4171278).
             */
            if (gcLatencyRequest == null) {
                gcLatencyRequest = GC.requestLatency(gcInterval);
            }
        }
        return entry;
    }
}