hotspot/test/gc/g1/humongousObjects/objectGraphTest/GC.java
author stsmirno
Mon, 17 Oct 2016 18:54:12 -0400
changeset 41705 332239c052cc
parent 39618 ced8c3f59678
permissions -rw-r--r--
8165687: Fix license and copyright headers in jd9 under hotspot/test Summary: Legal notices and Oracle copyrights were updated (white and blank space, commas) in tests files for uniformity to meet Oracle requirements. Reviewed-by: dholmes, iris Contributed-by: Stanislav Smirnov <stanislav.smirnov@oracle.com>, Vassili Igouchkine <vassili.igouchkine@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38256
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     1
/*
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     4
 *
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     8
 *
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    13
 * accompanied this code).
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    14
 *
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    18
 *
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    21
 * questions.
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    22
 */
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    23
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    24
package gc.g1.humongousObjects.objectGraphTest;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    25
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    26
import gc.testlibrary.Helpers;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    27
import jdk.test.lib.Asserts;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    28
import sun.hotspot.WhiteBox;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    29
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    30
import java.util.Arrays;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    31
import java.util.List;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    32
import java.util.function.Consumer;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    33
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    34
/**
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    35
 * Provides methods to initiate GC of requested type and
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    36
 * checks for states of humongous and non-humongous soft/weak externally
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    37
 * referenced objects after GCs
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    38
 */
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    39
public enum GC {
39280
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    40
    CMC {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    41
        @Override
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    42
        public Runnable get() {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    43
            return () -> {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    44
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    45
                WHITE_BOX.g1StartConcMarkCycle();
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    46
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    47
            };
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    48
        }
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    49
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    50
        public Consumer<ReferenceInfo<Object[]>> getChecker() {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    51
            return getCheckerImpl(false, false, true, false);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    52
        }
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    53
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    54
        @Override
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    55
        public List<String> shouldContain() {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    56
            return Arrays.asList(GCTokens.WB_INITIATED_CMC);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    57
        }
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    58
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    59
        @Override
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    60
        public List<String> shouldNotContain() {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    61
            return Arrays.asList(GCTokens.WB_INITIATED_YOUNG_GC, GCTokens.WB_INITIATED_MIXED_GC,
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    62
                    GCTokens.FULL_GC, GCTokens.YOUNG_GC);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    63
        }
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    64
    },
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    65
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    66
    CMC_NO_SURV_ROOTS {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    67
        @Override
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    68
        public Runnable get() {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    69
            return () -> {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    70
                WHITE_BOX.youngGC();
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    71
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    72
                WHITE_BOX.youngGC();
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    73
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    74
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    75
                WHITE_BOX.g1StartConcMarkCycle();
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    76
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    77
            };
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    78
        }
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    79
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    80
        public Consumer<ReferenceInfo<Object[]>> getChecker() {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    81
            return getCheckerImpl(true, false, true, false);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    82
        }
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    83
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    84
        @Override
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    85
        public List<String> shouldContain() {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    86
            return Arrays.asList(GCTokens.WB_INITIATED_CMC);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    87
        }
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    88
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    89
        @Override
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    90
        public List<String> shouldNotContain() {
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    91
            return Arrays.asList(GCTokens.WB_INITIATED_MIXED_GC,
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    92
                    GCTokens.FULL_GC, GCTokens.YOUNG_GC);
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    93
        }
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
    94
    },
38256
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    95
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    96
    YOUNG_GC {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    97
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    98
        public Runnable get() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
    99
            return WHITE_BOX::youngGC;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   100
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   101
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   102
        public Consumer<ReferenceInfo<Object[]>> getChecker() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   103
            return getCheckerImpl(false, false, true, false);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   104
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   105
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   106
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   107
        public List<String> shouldContain() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   108
            return Arrays.asList(GCTokens.WB_INITIATED_YOUNG_GC);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   109
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   110
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   111
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   112
        public List<String> shouldNotContain() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   113
            return Arrays.asList(GCTokens.WB_INITIATED_MIXED_GC, GCTokens.FULL_GC, GCTokens.WB_INITIATED_CMC,
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   114
                    GCTokens.CMC, GCTokens.YOUNG_GC);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   115
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   116
    },
39280
86907793a181 8132713: Add tests which check that Humongous objects behave as expected after finishing ConcMark Cycle
kzhaldyb
parents: 38256
diff changeset
   117
38256
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   118
    FULL_GC {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   119
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   120
        public Runnable get() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   121
            return System::gc;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   122
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   123
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   124
        public Consumer<ReferenceInfo<Object[]>> getChecker() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   125
            return getCheckerImpl(true, false, true, false);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   126
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   127
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   128
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   129
        public List<String> shouldContain() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   130
            return Arrays.asList(GCTokens.FULL_GC);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   131
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   132
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   133
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   134
        public List<String> shouldNotContain() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   135
            return Arrays.asList(GCTokens.WB_INITIATED_YOUNG_GC, GCTokens.WB_INITIATED_MIXED_GC,
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   136
                    GCTokens.WB_INITIATED_CMC, GCTokens.CMC, GCTokens.YOUNG_GC);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   137
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   138
    },
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   139
39618
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   140
    MIXED_GC {
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   141
        @Override
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   142
        public Runnable get() {
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   143
            return () -> {
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   144
                WHITE_BOX.youngGC();
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   145
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   146
                WHITE_BOX.youngGC();
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   147
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   148
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   149
                WHITE_BOX.g1StartConcMarkCycle();
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   150
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   151
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   152
                WHITE_BOX.youngGC();
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   153
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   154
                // Provoking Mixed GC
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   155
                WHITE_BOX.youngGC();// second evacuation pause will be mixed
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   156
                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   157
            };
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   158
        }
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   159
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   160
        public Consumer<ReferenceInfo<Object[]>> getChecker() {
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   161
            return getCheckerImpl(true, false, true, false);
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   162
        }
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   163
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   164
        @Override
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   165
        public List<String> shouldContain() {
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   166
            return Arrays.asList(GCTokens.WB_INITIATED_CMC);
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   167
        }
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   168
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   169
        @Override
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   170
        public List<String> shouldNotContain() {
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   171
            return Arrays.asList(GCTokens.YOUNG_GC);
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   172
        }
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   173
    },
ced8c3f59678 8132711: Add tests which check that Humongous objects behave as expected after Mixed GC
kzhaldyb
parents: 39280
diff changeset
   174
38256
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   175
    FULL_GC_MEMORY_PRESSURE {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   176
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   177
        public Runnable get() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   178
            return WHITE_BOX::fullGC;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   179
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   180
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   181
        public Consumer<ReferenceInfo<Object[]>> getChecker() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   182
            return getCheckerImpl(true, true, true, true);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   183
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   184
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   185
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   186
        public List<String> shouldContain() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   187
            return Arrays.asList(GCTokens.FULL_GC_MEMORY_PRESSURE);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   188
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   189
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   190
        @Override
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   191
        public List<String> shouldNotContain() {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   192
            return Arrays.asList(GCTokens.WB_INITIATED_YOUNG_GC, GCTokens.WB_INITIATED_MIXED_GC,
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   193
                    GCTokens.WB_INITIATED_CMC, GCTokens.CMC, GCTokens.YOUNG_GC, GCTokens.FULL_GC);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   194
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   195
    };
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   196
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   197
    protected String getErrorMessage(ReferenceInfo<Object[]> ref, boolean expectedNull, String gcType) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   198
        return String.format("Externally effectively %s referenced %shumongous object was%s deleted after %s",
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   199
                (ref.softlyReachable ? "soft" : "weak"), (ref.effectiveHumongous ? "" : "non-"),
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   200
                (expectedNull ? " not" : ""), gcType);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   201
    }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   202
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   203
    protected Consumer<ReferenceInfo<Object[]>> getCaseCheck(boolean expectedNull) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   204
        return expectedNull
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   205
                ? r -> Asserts.assertNull(r.reference.get(), getErrorMessage(r, true, name()))
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   206
                : r -> Asserts.assertNotNull(r.reference.get(), getErrorMessage(r, false, name()));
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   207
    }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   208
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   209
    protected Consumer<ReferenceInfo<Object[]>> getCheckerImpl(boolean weakH, boolean softH,
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   210
                                                               boolean weakS, boolean softS) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   211
        return new Checker(getCaseCheck(weakH), getCaseCheck(softH), getCaseCheck(weakS), getCaseCheck(softS));
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   212
    }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   213
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   214
    protected String getGcLogName(String prefix) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   215
        return prefix + "_" + name() + ".gc.log";
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   216
    }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   217
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   218
    private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   219
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   220
    /**
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   221
     * @return method to initiate GC
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   222
     */
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   223
    public abstract Runnable get();
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   224
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   225
    /**
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   226
     * @return checker for objects' states after GC
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   227
     */
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   228
    public abstract Consumer<ReferenceInfo<Object[]>> getChecker();
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   229
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   230
    /**
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   231
     * @return list of tokens that should be contained in gc log after gc of specified type
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   232
     */
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   233
    public abstract List<String> shouldContain();
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   234
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   235
    /**
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   236
     * @return list of tokens that should not be contained in gc log after gc of specified type
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   237
     */
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   238
    public abstract List<String> shouldNotContain();
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   239
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   240
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   241
    /**
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   242
     * Checks object' state after gc
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   243
     * Contains 4 Consumers which are called depending on humongous/non-humongous and
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   244
     * external weak/soft referenced objects
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   245
     */
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   246
    private static class Checker implements Consumer<ReferenceInfo<Object[]>> {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   247
        // 4 consumers with checks for (humongous /simple objects)*(weak/soft referenced)
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   248
        final Consumer<ReferenceInfo<Object[]>> weakHumongousCheck;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   249
        final Consumer<ReferenceInfo<Object[]>> softHumongousCheck;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   250
        final Consumer<ReferenceInfo<Object[]>> weakSimpleCheck;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   251
        final Consumer<ReferenceInfo<Object[]>> softSimpleCheck;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   252
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   253
        public Checker(Consumer<ReferenceInfo<Object[]>> weakHumongousCheck,
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   254
                       Consumer<ReferenceInfo<Object[]>> softHumongousCheck,
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   255
                       Consumer<ReferenceInfo<Object[]>> weakSimpleCheck,
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   256
                       Consumer<ReferenceInfo<Object[]>> softSimpleCheck) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   257
            this.weakHumongousCheck = weakHumongousCheck;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   258
            this.softHumongousCheck = softHumongousCheck;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   259
            this.weakSimpleCheck = weakSimpleCheck;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   260
            this.softSimpleCheck = softSimpleCheck;
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   261
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   262
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   263
        public void accept(ReferenceInfo<Object[]> ref) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   264
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   265
            System.out.println("reference.get() returned " + ref.reference.get());
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   266
            if (ref.effectiveHumongous && ref.softlyReachable) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   267
                System.out.println("soft and humongous");
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   268
                softHumongousCheck.accept(ref);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   269
            }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   270
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   271
            if (ref.effectiveHumongous && !ref.softlyReachable) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   272
                System.out.println("weak and humongous");
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   273
                weakHumongousCheck.accept(ref);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   274
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   275
            }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   276
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   277
            if (!ref.effectiveHumongous && ref.softlyReachable) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   278
                System.out.println("soft and non-humongous");
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   279
                softSimpleCheck.accept(ref);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   280
            }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   281
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   282
            if (!ref.effectiveHumongous && !ref.softlyReachable) {
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   283
                System.out.println("weak and non-humongous");
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   284
                weakSimpleCheck.accept(ref);
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   285
            }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   286
        }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   287
    }
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   288
685ac27ed264 8132710: Add tests which check that Humongous objects behave as expected after Young GC
kzhaldyb
parents:
diff changeset
   289
}