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"

Reviewed-by: kbarrett
  • Loading branch information
lmesnik committed Jul 21, 2021
1 parent 57611b3 commit b7245c6
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

2 comments on commit b7245c6

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@openjdk
Copy link

@openjdk openjdk bot commented on b7245c6 Jan 12, 2022

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-b7245c61 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit b7245c61 from the openjdk/jdk repository.

The commit being backported was authored by Leonid Mesnik on 21 Jul 2021 and was reviewed by Kim Barrett.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-b7245c61:GoeLin-backport-b7245c61
$ git checkout GoeLin-backport-b7245c61
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-b7245c61

Please sign in to comment.