Mon, 28 Jul 2014 15:06:38 -0700
8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn
tschatzl@5204 | 1 | /* |
tschatzl@5204 | 2 | * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
tschatzl@5204 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
tschatzl@5204 | 4 | * |
tschatzl@5204 | 5 | * This code is free software; you can redistribute it and/or modify it |
tschatzl@5204 | 6 | * under the terms of the GNU General Public License version 2 only, as |
tschatzl@5204 | 7 | * published by the Free Software Foundation. |
tschatzl@5204 | 8 | * |
tschatzl@5204 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
tschatzl@5204 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
tschatzl@5204 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
tschatzl@5204 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
tschatzl@5204 | 13 | * accompanied this code). |
tschatzl@5204 | 14 | * |
tschatzl@5204 | 15 | * You should have received a copy of the GNU General Public License version |
tschatzl@5204 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
tschatzl@5204 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
tschatzl@5204 | 18 | * |
tschatzl@5204 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
tschatzl@5204 | 20 | * or visit www.oracle.com if you need additional information or have any |
tschatzl@5204 | 21 | * questions. |
tschatzl@5204 | 22 | */ |
tschatzl@5204 | 23 | |
tschatzl@5204 | 24 | /* |
tschatzl@5204 | 25 | * @test TestSummarizeRSetStats.java |
tschatzl@5204 | 26 | * @bug 8013895 |
tschatzl@5204 | 27 | * @library /testlibrary |
tschatzl@5807 | 28 | * @build TestSummarizeRSetStatsTools TestSummarizeRSetStats |
tschatzl@5204 | 29 | * @summary Verify output of -XX:+G1SummarizeRSetStats |
tschatzl@5204 | 30 | * @run main TestSummarizeRSetStats |
tschatzl@5204 | 31 | * |
tschatzl@5204 | 32 | * Test the output of G1SummarizeRSetStats in conjunction with G1SummarizeRSetStatsPeriod. |
tschatzl@5204 | 33 | */ |
tschatzl@5204 | 34 | |
tschatzl@5204 | 35 | public class TestSummarizeRSetStats { |
tschatzl@5204 | 36 | |
tschatzl@5204 | 37 | public static void main(String[] args) throws Exception { |
tschatzl@5204 | 38 | String result; |
tschatzl@5204 | 39 | |
tschatzl@5807 | 40 | if (!TestSummarizeRSetStatsTools.testingG1GC()) { |
tschatzl@5807 | 41 | return; |
tschatzl@5807 | 42 | } |
tschatzl@5204 | 43 | |
tschatzl@5807 | 44 | // no remembered set summary output |
tschatzl@5807 | 45 | result = TestSummarizeRSetStatsTools.runTest(null, 0); |
tschatzl@5807 | 46 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 0, 0); |
tschatzl@5204 | 47 | |
tschatzl@5807 | 48 | // no remembered set summary output |
tschatzl@5807 | 49 | result = TestSummarizeRSetStatsTools.runTest(null, 2); |
tschatzl@5807 | 50 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 0, 0); |
tschatzl@5204 | 51 | |
tschatzl@5807 | 52 | // no remembered set summary output |
tschatzl@5807 | 53 | result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:G1SummarizeRSetStatsPeriod=1" }, 3); |
tschatzl@5807 | 54 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 0, 0); |
tschatzl@5204 | 55 | |
tschatzl@5807 | 56 | // single remembered set summary output at the end |
tschatzl@5807 | 57 | result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats" }, 0); |
tschatzl@5807 | 58 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 0); |
tschatzl@5204 | 59 | |
tschatzl@5807 | 60 | // single remembered set summary output at the end |
tschatzl@5807 | 61 | result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats" }, 2); |
tschatzl@5807 | 62 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 0); |
tschatzl@5204 | 63 | |
tschatzl@5807 | 64 | // single remembered set summary output |
tschatzl@5807 | 65 | result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=1" }, 0); |
tschatzl@5807 | 66 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 0); |
tschatzl@5204 | 67 | |
tschatzl@5807 | 68 | // two times remembered set summary output |
tschatzl@5807 | 69 | result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=1" }, 1); |
tschatzl@5807 | 70 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 2); |
tschatzl@5204 | 71 | |
tschatzl@5807 | 72 | // four times remembered set summary output |
tschatzl@5807 | 73 | result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=1" }, 3); |
tschatzl@5807 | 74 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 6); |
tschatzl@5204 | 75 | |
tschatzl@5807 | 76 | // three times remembered set summary output |
tschatzl@5807 | 77 | result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=2" }, 3); |
tschatzl@5807 | 78 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 4); |
tschatzl@5807 | 79 | |
tschatzl@5807 | 80 | // single remembered set summary output |
tschatzl@5807 | 81 | result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=100" }, 3); |
tschatzl@5807 | 82 | TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 2); |
tschatzl@5204 | 83 | } |
tschatzl@5204 | 84 | } |
tschatzl@5204 | 85 |