8270171: Shenandoah: Cleanup TestStringDedup and TestStringDedupStress tests
Reviewed-by: shade
This commit is contained in:
parent
3588634d54
commit
e4c24f01ef
test/hotspot/jtreg/gc/shenandoah
@ -49,7 +49,6 @@
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc:open
|
||||
* @modules java.base/java.lang:open
|
||||
* java.management
|
||||
*
|
||||
@ -72,7 +71,6 @@
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc:open
|
||||
* @modules java.base/java.lang:open
|
||||
* java.management
|
||||
*
|
||||
@ -89,11 +87,8 @@ import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
import jdk.test.lib.Utils;
|
||||
|
||||
import sun.misc.*;
|
||||
|
||||
public class TestStringDedup {
|
||||
private static Field valueField;
|
||||
private static Unsafe unsafe;
|
||||
|
||||
private static final int UniqueStrings = 20;
|
||||
// How many GC cycles are needed to complete deduplication.
|
||||
@ -101,10 +96,6 @@ public class TestStringDedup {
|
||||
|
||||
static {
|
||||
try {
|
||||
Field field = Unsafe.class.getDeclaredField("theUnsafe");
|
||||
field.setAccessible(true);
|
||||
unsafe = (Unsafe) field.get(null);
|
||||
|
||||
valueField = String.class.getDeclaredField("value");
|
||||
valueField.setAccessible(true);
|
||||
} catch (Exception e) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
|
||||
* Copyright (c) 2017, 2021, Red Hat, Inc. 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
|
||||
@ -28,7 +28,6 @@
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc:open
|
||||
* @modules java.base/java.lang:open
|
||||
* java.management
|
||||
*
|
||||
@ -49,7 +48,6 @@
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc:open
|
||||
* @modules java.base/java.lang:open
|
||||
* java.management
|
||||
*
|
||||
@ -80,7 +78,6 @@
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc:open
|
||||
* @modules java.base/java.lang:open
|
||||
* java.management
|
||||
*
|
||||
@ -111,11 +108,8 @@ import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
import jdk.test.lib.Utils;
|
||||
|
||||
import sun.misc.*;
|
||||
|
||||
public class TestStringDedupStress {
|
||||
private static Field valueField;
|
||||
private static Unsafe unsafe;
|
||||
|
||||
private static final int TARGET_STRINGS = Integer.getInteger("targetStrings", 2_500_000);
|
||||
private static final long MAX_REWRITE_GC_CYCLES = 6;
|
||||
@ -125,10 +119,6 @@ public class TestStringDedupStress {
|
||||
|
||||
static {
|
||||
try {
|
||||
Field field = Unsafe.class.getDeclaredField("theUnsafe");
|
||||
field.setAccessible(true);
|
||||
unsafe = (Unsafe) field.get(null);
|
||||
|
||||
valueField = String.class.getDeclaredField("value");
|
||||
valueField.setAccessible(true);
|
||||
} catch (Exception e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user