2362N/A * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @bug 6460501 6236036 6500694 6490770 0N/A * @summary Repeated failed timed waits shouldn't leak memory 0N/A * @author Martin Buchholz 0N/A// Note: this file is now out of sync with the jsr166 CVS repository due to the fix for 7092140 0N/A final char[]
buf =
new char[
1024];
// Check for successful process completion // To be called exactly twice by the parent process // To be called exactly twice by the child process for (
int i =
0; i <
100; i++) {
"(?m)^ *[0-9]+: +([0-9]+) +[0-9]+ +\\Q"+
className+
"\\E$";
"-dump:file=dump,format=b",
// jmap doesn't work on Windows java,
"-Xmx8m",
"-XX:+UsePerfData",
// Check that no objects were leaked. //---------------------------------------------------------------- // The main class of the child process. // - provide the name of a class to check for leaks. // - call rendezvousChild exactly twice, while quiescent. // - in between calls to rendezvousChild, run code that may leak. //---------------------------------------------------------------- public static class Job {
"java.util.concurrent.locks.AbstractQueuedSynchronizer$Node";
//rnd.nextInt(Runtime.getRuntime().availableProcessors() + 1) + 1; // On Linux, this test runs very slowly for some reason, // so use a smaller number of iterations. // Solaris can handle 1 << 18. // On the other hand, jmap is much slower on Solaris... //int t = rnd.nextInt(2000); // If something goes wrong, we might never see it, since IO // streams are connected to the parent. So we need a special // purpose print method to debug Jobs. //--------------------- Infrastructure --------------------------- else fail(x +
" not equal to " + y);}