Skip to content

Commit

Permalink
8269849: vmTestbase/gc/gctests/PhantomReference/phantom002/TestDescri…
Browse files Browse the repository at this point in the history
…ption.java failed with "OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects"

Backport-of: b7245c6164df3f01c34f4f3c94185a6b6d338551
  • Loading branch information
GoeLin committed Jan 13, 2022
1 parent 2e5c400 commit f652b44
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static void main(String[] args) {
}

// The class implements the logic of the testcase
class Test implements Runnable {
class Test implements Runnable, OOMStress {

int iteration;
private volatile boolean finalized;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -62,6 +62,7 @@

import nsk.share.gc.GC;
import nsk.share.gc.NonbranchyTree;
import nsk.share.gc.OOMStress;
import nsk.share.gc.ThreadedGCTest;
import nsk.share.gc.gp.GarbageProducer;
import nsk.share.gc.gp.GarbageProducerAware;
Expand Down Expand Up @@ -99,7 +100,7 @@ public static void main(String[] args) {
}

// The class implements the logic of the testcase
class Test implements Runnable {
class Test implements Runnable, OOMStress {

int iteration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -50,7 +50,7 @@
*/
public class soft003 extends ThreadedGCTest {

class Worker implements Runnable {
class Worker implements Runnable, OOMStress {

private int arrayLength;
private int objectSize = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -48,7 +48,7 @@
*/
public class soft004 extends ThreadedGCTest {

class Worker implements Runnable {
class Worker implements Runnable, OOMStress {

private int arrayLength;
private int objectSize = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -48,7 +48,7 @@
*/
public class soft005 extends ThreadedGCTest {

class Worker implements Runnable {
class Worker implements Runnable, OOMStress {

private int length = 10000;
private int objectSize = 10000;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -62,6 +62,7 @@

import nsk.share.gc.GC;
import nsk.share.gc.NonbranchyTree;
import nsk.share.gc.OOMStress;
import nsk.share.gc.ThreadedGCTest;
import nsk.share.gc.gp.GarbageProducer;
import nsk.share.gc.gp.GarbageProducerAware;
Expand Down Expand Up @@ -99,7 +100,7 @@ public static void main(String[] args) {
}

// The class implements the logic of the testcase
class Test implements Runnable {
class Test implements Runnable, OOMStress {

int iteration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -54,7 +54,7 @@
*/
public class weak003 extends ThreadedGCTest {

class Worker implements Runnable {
class Worker implements Runnable, OOMStress {

private int arrayLength;
private int objectSize = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -46,7 +46,7 @@
*/
public class weak004 extends ThreadedGCTest {

class Worker implements Runnable {
class Worker implements Runnable, OOMStress {

private int arrayLength;
private int objectSize = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -48,7 +48,7 @@
*/
public class weak005 extends ThreadedGCTest {

class Worker implements Runnable {
class Worker implements Runnable, OOMStress {

private int length = 10000;
private int objectSize = 10000;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -53,7 +53,7 @@
*/
public class weak006 extends ThreadedGCTest {

class Worker implements Runnable {
class Worker implements Runnable, OOMStress {

private int length;
private int objectSize = 100;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -51,7 +51,7 @@
*/
public class weak007 extends ThreadedGCTest {

class Worker implements Runnable {
class Worker implements Runnable, OOMStress {

private int length = 10000;
private int objectSize = 10000;
Expand Down

1 comment on commit f652b44

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.