Skip to content
Permalink
Browse files
8280554: resourcehogs/serviceability/sa/ClhsdbRegionDetailsScanOopsFo…
…rG1.java can fail if GC is triggered

Reviewed-by: alanb, amenkov, lmesnik
  • Loading branch information
plummercj committed Feb 1, 2022
1 parent 5080e81 commit 4532c3a1639af0b4ff8c4f42c3796fa73ca5be83
Showing 2 changed files with 5 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, 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
@@ -63,7 +63,6 @@ public static void main(String[] args) throws Exception {
expStrMap.put("g1regiondetails", List.of(
"Region",
"Eden",
"Survivor",
"StartsHumongous",
"ContinuesHumongous",
"Free"));
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, 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
@@ -23,6 +23,8 @@

import jdk.test.lib.apps.LingeredApp;

import java.lang.ref.Reference;

public class LingeredAppWithLargeStringArray extends LingeredApp {
public static void main(String args[]) {
String[] hugeArray = new String[Integer.MAX_VALUE/8];
@@ -31,5 +33,6 @@ public static void main(String args[]) {
hugeArray[i] = new String(smallArray[i%3]);
}
LingeredApp.main(args);
Reference.reachabilityFence(hugeArray);
}
}

1 comment on commit 4532c3a

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 4532c3a Feb 1, 2022

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.