Skip to content

Commit f652b44

Browse files
committed
8269849: vmTestbase/gc/gctests/PhantomReference/phantom002/TestDescription.java failed with "OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects"
Backport-of: b7245c6164df3f01c34f4f3c94185a6b6d338551
1 parent 2e5c400 commit f652b44

File tree

11 files changed

+23
-21
lines changed

11 files changed

+23
-21
lines changed

test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static void main(String[] args) {
9494
}
9595

9696
// The class implements the logic of the testcase
97-
class Test implements Runnable {
97+
class Test implements Runnable, OOMStress {
9898

9999
int iteration;
100100
private volatile boolean finalized;

test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft001/soft001.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -62,6 +62,7 @@
6262

6363
import nsk.share.gc.GC;
6464
import nsk.share.gc.NonbranchyTree;
65+
import nsk.share.gc.OOMStress;
6566
import nsk.share.gc.ThreadedGCTest;
6667
import nsk.share.gc.gp.GarbageProducer;
6768
import nsk.share.gc.gp.GarbageProducerAware;
@@ -99,7 +100,7 @@ public static void main(String[] args) {
99100
}
100101

101102
// The class implements the logic of the testcase
102-
class Test implements Runnable {
103+
class Test implements Runnable, OOMStress {
103104

104105
int iteration;
105106

test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft003/soft003.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@
5050
*/
5151
public class soft003 extends ThreadedGCTest {
5252

53-
class Worker implements Runnable {
53+
class Worker implements Runnable, OOMStress {
5454

5555
private int arrayLength;
5656
private int objectSize = 100;

test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft004/soft004.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@
4848
*/
4949
public class soft004 extends ThreadedGCTest {
5050

51-
class Worker implements Runnable {
51+
class Worker implements Runnable, OOMStress {
5252

5353
private int arrayLength;
5454
private int objectSize = 100;

test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft005/soft005.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@
4848
*/
4949
public class soft005 extends ThreadedGCTest {
5050

51-
class Worker implements Runnable {
51+
class Worker implements Runnable, OOMStress {
5252

5353
private int length = 10000;
5454
private int objectSize = 10000;

test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak001/weak001.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -62,6 +62,7 @@
6262

6363
import nsk.share.gc.GC;
6464
import nsk.share.gc.NonbranchyTree;
65+
import nsk.share.gc.OOMStress;
6566
import nsk.share.gc.ThreadedGCTest;
6667
import nsk.share.gc.gp.GarbageProducer;
6768
import nsk.share.gc.gp.GarbageProducerAware;
@@ -99,7 +100,7 @@ public static void main(String[] args) {
99100
}
100101

101102
// The class implements the logic of the testcase
102-
class Test implements Runnable {
103+
class Test implements Runnable, OOMStress {
103104

104105
int iteration;
105106

test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak003/weak003.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@
5454
*/
5555
public class weak003 extends ThreadedGCTest {
5656

57-
class Worker implements Runnable {
57+
class Worker implements Runnable, OOMStress {
5858

5959
private int arrayLength;
6060
private int objectSize = 100;

test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak004/weak004.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
4646
*/
4747
public class weak004 extends ThreadedGCTest {
4848

49-
class Worker implements Runnable {
49+
class Worker implements Runnable, OOMStress {
5050

5151
private int arrayLength;
5252
private int objectSize = 100;

test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak005/weak005.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@
4848
*/
4949
public class weak005 extends ThreadedGCTest {
5050

51-
class Worker implements Runnable {
51+
class Worker implements Runnable, OOMStress {
5252

5353
private int length = 10000;
5454
private int objectSize = 10000;

test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,7 @@
5353
*/
5454
public class weak006 extends ThreadedGCTest {
5555

56-
class Worker implements Runnable {
56+
class Worker implements Runnable, OOMStress {
5757

5858
private int length;
5959
private int objectSize = 100;

0 commit comments

Comments
 (0)