15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test TestG1TraceEagerReclaimHumongousObjects 26 * @bug 8058801 8048179 27 * @summary Ensure that the output for a G1TraceEagerReclaimHumongousObjects 28 * includes the expected necessary messages. 29 * @key gc 30 * @library /testlibrary 31 * @modules java.base/sun.misc 32 * java.management 33 */ 34 35 import com.oracle.java.testlibrary.ProcessTools; 36 import com.oracle.java.testlibrary.OutputAnalyzer; 37 import java.util.LinkedList; 38 39 public class TestG1TraceEagerReclaimHumongousObjects { 40 public static void main(String[] args) throws Exception { 41 testGCLogs(); 42 testHumongousObjectGCLogs(); 43 } 44 45 private static void testGCLogs() throws Exception { 46 47 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC", 48 "-Xms128M", 49 "-Xmx128M", 50 "-Xmn16M", 51 "-XX:G1HeapRegionSize=1M", 52 "-XX:+PrintGC", 53 "-XX:+UnlockExperimentalVMOptions", 54 "-XX:G1LogLevel=finest", 55 "-XX:+G1TraceEagerReclaimHumongousObjects", 56 GCTest.class.getName()); | 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test TestG1TraceEagerReclaimHumongousObjects 26 * @bug 8058801 8048179 27 * @summary Ensure that the output for a G1TraceEagerReclaimHumongousObjects 28 * includes the expected necessary messages. 29 * @key gc 30 * @library /testlibrary 31 * @modules java.base/sun.misc 32 * java.management 33 */ 34 35 import jdk.test.lib.ProcessTools; 36 import jdk.test.lib.OutputAnalyzer; 37 import java.util.LinkedList; 38 39 public class TestG1TraceEagerReclaimHumongousObjects { 40 public static void main(String[] args) throws Exception { 41 testGCLogs(); 42 testHumongousObjectGCLogs(); 43 } 44 45 private static void testGCLogs() throws Exception { 46 47 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC", 48 "-Xms128M", 49 "-Xmx128M", 50 "-Xmn16M", 51 "-XX:G1HeapRegionSize=1M", 52 "-XX:+PrintGC", 53 "-XX:+UnlockExperimentalVMOptions", 54 "-XX:G1LogLevel=finest", 55 "-XX:+G1TraceEagerReclaimHumongousObjects", 56 GCTest.class.getName()); |