8243431: use reproducible random in :vmTestbase_vm_metaspace
Reviewed-by: dholmes
This commit is contained in:
parent
80d280263a
commit
0b7a47665f
test/hotspot/jtreg/vmTestbase/metaspace
flags/maxMetaspaceSize
staticReferences
stressDictionary
stressHierarchy
common/generateHierarchy
stressHierarchy001
stressHierarchy002
stressHierarchy003
stressHierarchy004
stressHierarchy005
stressHierarchy006
stressHierarchy007
stressHierarchy008
stressHierarchy009
stressHierarchy010
stressHierarchy011
stressHierarchy012
stressHierarchy013
stressHierarchy014
stressHierarchy015
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/flags/maxMetaspaceSize.
|
||||
*
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
* @modules java.base/jdk.internal.misc:+open
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/staticReferences.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2020, 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,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressDictionary.
|
||||
* VM Testbase keywords: [nonconcurrent, javac]
|
||||
@ -60,6 +61,10 @@ public class StressDictionary extends GCTestBase {
|
||||
private static byte[] bytecode;
|
||||
|
||||
private class FillingDictionaryWorker implements Callable<Object> {
|
||||
private final Random random;
|
||||
public FillingDictionaryWorker(long seed) {
|
||||
this.random = new Random(seed);
|
||||
}
|
||||
@Override
|
||||
public Object call() throws Exception {
|
||||
while (stresser.continueExecution()) {
|
||||
@ -117,7 +122,7 @@ public class StressDictionary extends GCTestBase {
|
||||
bytecode = generateAndCompile();
|
||||
List<Callable<Object>> tasks = new LinkedList<Callable<Object>>();
|
||||
for (int i = 0; i < NUMBER_OF_CORRUPTING_THREADS; i++) {
|
||||
tasks.add(this.new FillingDictionaryWorker());
|
||||
tasks.add(this.new FillingDictionaryWorker(random.nextLong()));
|
||||
}
|
||||
for (int i = 0; i < NUMBER_OF_NOT_CORRUPTING_THREADS; i++) {
|
||||
tasks.add(this.new RegularWorker());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2020, 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
|
||||
@ -25,6 +25,7 @@ package metaspace.stressHierarchy.common.generateHierarchy;
|
||||
import java.util.*;
|
||||
|
||||
import vm.share.InMemoryJavaCompiler;
|
||||
import jdk.test.lib.Utils;
|
||||
|
||||
public class GenerateHierarchyHelper {
|
||||
|
||||
@ -41,7 +42,7 @@ public class GenerateHierarchyHelper {
|
||||
|
||||
private static final int EDGE_IN_MIXED_CASE = 30;
|
||||
|
||||
private static Random random = new Random();
|
||||
private static Random random = Utils.getRandomInstance();
|
||||
|
||||
public static TreeDescriptor generateHierarchy(int depth, int minLevelSize, int maxLevelSize, Type type) {
|
||||
TreeDescriptor tree = new TreeDescriptor();
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy001.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy002.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy003.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy004.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy005.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy006.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy007.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy008.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy009.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy010.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy011.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy012.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy013.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy014.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key randomness
|
||||
*
|
||||
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy015.
|
||||
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
|
||||
|
Loading…
x
Reference in New Issue
Block a user