Fetch the repository succeeded.
This action will force synchronization from src-openEuler/openjdk-1.8.0, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
From 40b88d64b144bd1b94b2a887c132ec88b3a9a39d Mon Sep 17 00:00:00 2001
Date: Thu, 21 Sep 2023 15:26:13 +0800
Subject: add 8147940-Modify-testcase-this-test-does-not-assume-th
---
...stG1TraceEagerReclaimHumongousObjects.java | 45 +------------------
1 file changed, 1 insertion(+), 44 deletions(-)
diff --git a/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java b/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
index e653554c9..aca54daf6 100644
--- a/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
+++ b/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, 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
@@ -36,36 +36,6 @@ import java.util.LinkedList;
public class TestG1TraceEagerReclaimHumongousObjects {
public static void main(String[] args) throws Exception {
- testGCLogs();
- testHumongousObjectGCLogs();
- }
-
- private static void testGCLogs() throws Exception {
-
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
- "-Xms128M",
- "-Xmx128M",
- "-Xmn16M",
- "-XX:G1HeapRegionSize=1M",
- "-XX:+PrintGC",
- "-XX:+UnlockExperimentalVMOptions",
- "-XX:G1LogLevel=finest",
- "-XX:+G1TraceEagerReclaimHumongousObjects",
- GCTest.class.getName());
-
- OutputAnalyzer output = new OutputAnalyzer(pb.start());
-
- // As G1EagerReclaimHumongousObjects is set(default), below logs should be displayed.
- // And GCTest doesn't have humongous objects, so values should be zero.
- output.shouldContain("[Humongous Reclaim");
- output.shouldContain("[Humongous Total: 0]");
- output.shouldContain("[Humongous Candidate: 0]");
- output.shouldContain("[Humongous Reclaimed: 0]");
-
- output.shouldHaveExitValue(0);
- }
-
- private static void testHumongousObjectGCLogs() throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
"-Xms128M",
"-Xmx128M",
@@ -92,19 +62,6 @@ public class TestG1TraceEagerReclaimHumongousObjects {
output.shouldHaveExitValue(0);
}
- static class GCTest {
- private static byte[] garbage;
-
- public static void main(String [] args) {
- System.out.println("Creating garbage");
- // create 128MB of garbage. This should result in at least one GC
- for (int i = 0; i < 1024; i++) {
- garbage = new byte[128 * 1024];
- }
- System.out.println("Done");
- }
- }
-
static class GCWithHumongousObjectTest {
public static final int M = 1024*1024;
--
2.22.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。