hotspot/test/gc/g1/TestSummarizeRSetStatsTools.java
author jprovino
Wed, 11 Nov 2015 23:47:42 +0000
changeset 33911 af2cff5bd523
parent 31629 892d04ec5304
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20305
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
     1
/*
30247
9925b07bba5b 8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents: 25362
diff changeset
     2
 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
20305
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
     4
 *
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
     7
 * published by the Free Software Foundation.
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
     8
 *
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    13
 * accompanied this code).
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    14
 *
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    18
 *
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    21
 * questions.
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    22
 */
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    23
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    24
/*
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    25
 * Common helpers for TestSummarizeRSetStats* tests
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    26
 */
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    27
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    28
import com.sun.management.HotSpotDiagnosticMXBean;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    29
import com.sun.management.VMOption;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    30
30604
b8d532cb6420 8067013: Rename the com.oracle.java.testlibary package
ykantser
parents: 30247
diff changeset
    31
import jdk.test.lib.*;
30247
9925b07bba5b 8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents: 25362
diff changeset
    32
import java.lang.management.ManagementFactory;
20305
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    33
import java.util.ArrayList;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    34
import java.util.Arrays;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    35
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    36
class VerifySummaryOutput {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    37
    // 4M size, both are directly allocated into the old gen
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    38
    static Object[] largeObject1 = new Object[1024 * 1024];
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    39
    static Object[] largeObject2 = new Object[1024 * 1024];
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    40
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    41
    static int[] temp;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    42
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    43
    public static void main(String[] args) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    44
        // create some cross-references between these objects
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    45
        for (int i = 0; i < largeObject1.length; i++) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    46
            largeObject1[i] = largeObject2;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    47
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    48
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    49
        for (int i = 0; i < largeObject2.length; i++) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    50
            largeObject2[i] = largeObject1;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    51
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    52
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    53
        int numGCs = Integer.parseInt(args[0]);
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    54
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    55
        if (numGCs > 0) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    56
            // try to force a minor collection: the young gen is 4M, the
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    57
            // amount of data allocated below is roughly that (4*1024*1024 +
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    58
            // some header data)
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    59
            for (int i = 0; i < 1024 ; i++) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    60
                temp = new int[1024];
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    61
            }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    62
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    63
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    64
        for (int i = 0; i < numGCs - 1; i++) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    65
            System.gc();
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    66
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    67
    }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    68
}
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    69
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    70
public class TestSummarizeRSetStatsTools {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    71
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    72
    // the VM is currently run using G1GC, i.e. trying to test G1 functionality.
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    73
    public static boolean testingG1GC() {
30247
9925b07bba5b 8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents: 25362
diff changeset
    74
        HotSpotDiagnosticMXBean diagnostic =
9925b07bba5b 8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents: 25362
diff changeset
    75
            ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class);
20305
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    76
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    77
        VMOption option = diagnostic.getVMOption("UseG1GC");
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    78
        if (option.getValue().equals("false")) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    79
          System.out.println("Skipping this test. It is only a G1 test.");
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    80
          return false;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    81
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    82
        return true;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    83
    }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    84
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    85
    public static String runTest(String[] additionalArgs, int numGCs) throws Exception {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    86
        ArrayList<String> finalargs = new ArrayList<String>();
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    87
        String[] defaultArgs = new String[] {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    88
            "-XX:+UseG1GC",
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    89
            "-Xmn4m",
31629
892d04ec5304 8129977: TestSummarizeRSetStats.java fails: Incorrect amount of per-period RSet summaries at the end
tschatzl
parents: 30604
diff changeset
    90
            "-Xms20m",
20305
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    91
            "-Xmx20m",
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    92
            "-XX:InitiatingHeapOccupancyPercent=100", // we don't want the additional GCs due to initial marking
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    93
            "-XX:+PrintGC",
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    94
            "-XX:+UnlockDiagnosticVMOptions",
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    95
            "-XX:G1HeapRegionSize=1M",
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    96
        };
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    97
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    98
        finalargs.addAll(Arrays.asList(defaultArgs));
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
    99
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   100
        if (additionalArgs != null) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   101
            finalargs.addAll(Arrays.asList(additionalArgs));
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   102
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   103
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   104
        finalargs.add(VerifySummaryOutput.class.getName());
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   105
        finalargs.add(String.valueOf(numGCs));
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   106
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   107
        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   108
            finalargs.toArray(new String[0]));
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   109
        OutputAnalyzer output = new OutputAnalyzer(pb.start());
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   110
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   111
        output.shouldHaveExitValue(0);
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   112
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   113
        String result = output.getStdout();
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   114
        return result;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   115
    }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   116
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   117
    private static void checkCounts(int expected, int actual, String which) throws Exception {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   118
        if (expected != actual) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   119
            throw new Exception("RSet summaries mention " + which + " regions an incorrect number of times. Expected " + expected + ", got " + actual);
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   120
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   121
    }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   122
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   123
    public static void expectPerRegionRSetSummaries(String result, int expectedCumulative, int expectedPeriodic) throws Exception {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   124
        expectRSetSummaries(result, expectedCumulative, expectedPeriodic);
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   125
        int actualYoung = result.split("Young regions").length - 1;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   126
        int actualHumonguous = result.split("Humonguous regions").length - 1;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   127
        int actualFree = result.split("Free regions").length - 1;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   128
        int actualOther = result.split("Old regions").length - 1;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   129
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   130
        // the strings we check for above are printed four times per summary
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   131
        int expectedPerRegionTypeInfo = (expectedCumulative + expectedPeriodic) * 4;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   132
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   133
        checkCounts(expectedPerRegionTypeInfo, actualYoung, "Young");
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   134
        checkCounts(expectedPerRegionTypeInfo, actualHumonguous, "Humonguous");
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   135
        checkCounts(expectedPerRegionTypeInfo, actualFree, "Free");
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   136
        checkCounts(expectedPerRegionTypeInfo, actualOther, "Old");
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   137
    }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   138
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   139
    public static void expectRSetSummaries(String result, int expectedCumulative, int expectedPeriodic) throws Exception {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   140
        int actualTotal = result.split("concurrent refinement").length - 1;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   141
        int actualCumulative = result.split("Cumulative RS summary").length - 1;
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   142
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   143
        if (expectedCumulative != actualCumulative) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   144
            throw new Exception("Incorrect amount of RSet summaries at the end. Expected " + expectedCumulative + ", got " + actualCumulative);
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   145
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   146
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   147
        if (expectedPeriodic != (actualTotal - actualCumulative)) {
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   148
            throw new Exception("Incorrect amount of per-period RSet summaries at the end. Expected " + expectedPeriodic + ", got " + (actualTotal - actualCumulative));
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   149
        }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   150
    }
af013cf4a5e6 8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
diff changeset
   151
}