14 * 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 TestEagerReclaimHumongousRegionsWithRefs 26 * @bug 8048179 27 * @summary Test to make sure that eager reclaim of humongous objects that have previously 28 * been referenced by other old gen regions work. We simply try to fill 29 * up the heap with humongous objects and create a remembered set entry from an object by 30 * referencing that we know is in the old gen. After changing this reference, the object 31 * should still be eagerly reclaimable to avoid Full GC. 32 * @key gc 33 * @library /testlibrary 34 */ 35 36 import java.util.regex.Pattern; 37 import java.util.regex.Matcher; 38 import java.util.LinkedList; 39 40 import com.oracle.java.testlibrary.OutputAnalyzer; 41 import com.oracle.java.testlibrary.ProcessTools; 42 import static com.oracle.java.testlibrary.Asserts.*; 43 44 class RefHolder { 45 Object ref; 46 } 47 48 class ReclaimRegionFast { 49 50 public static final int M = 1024*1024; 51 52 public static LinkedList<Object> garbageList = new LinkedList<Object>(); 53 | 14 * 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 TestEagerReclaimHumongousRegionsWithRefs 26 * @bug 8048179 27 * @summary Test to make sure that eager reclaim of humongous objects that have previously 28 * been referenced by other old gen regions work. We simply try to fill 29 * up the heap with humongous objects and create a remembered set entry from an object by 30 * referencing that we know is in the old gen. After changing this reference, the object 31 * should still be eagerly reclaimable to avoid Full GC. 32 * @key gc 33 * @library /testlibrary 34 * @build com.oracle.java.testlibrary.* 35 * @run main/othervm TestEagerReclaimHumongousRegionsWithRefs 36 */ 37 38 import java.util.regex.Pattern; 39 import java.util.regex.Matcher; 40 import java.util.LinkedList; 41 42 import com.oracle.java.testlibrary.OutputAnalyzer; 43 import com.oracle.java.testlibrary.ProcessTools; 44 import static com.oracle.java.testlibrary.Asserts.*; 45 46 class RefHolder { 47 Object ref; 48 } 49 50 class ReclaimRegionFast { 51 52 public static final int M = 1024*1024; 53 54 public static LinkedList<Object> garbageList = new LinkedList<Object>(); 55 |