< prev index next >
test/hotspot/jtreg/vmTestbase/gc/memory/LargePagesTest/LargePagesTest.java
Print this page
rev 59093 : [mq]: randomness-code_vmTestbase_gc
rev 59094 : imported patch randomness-keyword_vmTestbase_gc
rev 59095 : imported patch 8243430.00
*** 1,7 ****
/*
! * Copyright (c) 2013, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 21,31 ****
* questions.
*/
/*
* @test
! * @key stress gc
*
* @summary converted from VM Testbase gc/memory/LargePagesTest.
* VM Testbase keywords: [gc, stress, stressopt]
*
* @library /vmTestbase
--- 21,31 ----
* questions.
*/
/*
* @test
! * @key stress gc randomness
*
* @summary converted from VM Testbase gc/memory/LargePagesTest.
* VM Testbase keywords: [gc, stress, stressopt]
*
* @library /vmTestbase
*** 35,45 ****
*/
package gc.memory.LargePagesTest;
import java.io.PrintStream;
! import java.util.Random;
/*
* Allocators purpose is to create pressure on the garbage collector
* for a certain amount of time.
* Note: this test moved from the "jr", the original name is func.vm.largepages.LargePagesTest
--- 35,45 ----
*/
package gc.memory.LargePagesTest;
import java.io.PrintStream;
! import nsk.share.test.LocalRandom;
/*
* Allocators purpose is to create pressure on the garbage collector
* for a certain amount of time.
* Note: this test moved from the "jr", the original name is func.vm.largepages.LargePagesTest
*** 156,183 ****
result = true;
}
}
private void allocate() {
-
- Random r = new Random();
for (int j = 0; j < 1000; j++) {
- r = new Random();
int i = 0;
switch (myType) {
case SMALL_OBJECT_ALLOCATER:
i = 5;
break;
case LARGE_OBJECT_ALLOCATER:
i = 1;
break;
case ANY_OBJECT_ALLOCATER:
! i = r.nextInt(100);
break;
case ANY_NO_MULTIARRAYS_ALLOCATER:
! i = r.nextInt(100);
if ((i >= 2) && (i <= 4)) {
i = 5;
}
break;
default:
--- 156,180 ----
result = true;
}
}
private void allocate() {
for (int j = 0; j < 1000; j++) {
int i = 0;
switch (myType) {
case SMALL_OBJECT_ALLOCATER:
i = 5;
break;
case LARGE_OBJECT_ALLOCATER:
i = 1;
break;
case ANY_OBJECT_ALLOCATER:
! i = LocalRandom.nextInt(100);
break;
case ANY_NO_MULTIARRAYS_ALLOCATER:
! i = LocalRandom.nextInt(100);
if ((i >= 2) && (i <= 4)) {
i = 5;
}
break;
default:
< prev index next >