Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jdk17u
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
openjdk
jdk17u
Commits
d5d26be7
Commit
d5d26be7
authored
8 months ago
by
Andrew Lu
Browse files
Options
Downloads
Patches
Plain Diff
8315936: Parallelize gc/stress/TestStressG1Humongous.java test
Backport-of: 3f19df685c342cef212305cca630331878a24e79
parent
2e3ca314
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/hotspot/jtreg/gc/stress/TestStressG1Humongous.java
+39
-10
39 additions, 10 deletions
test/hotspot/jtreg/gc/stress/TestStressG1Humongous.java
with
39 additions
and
10 deletions
test/hotspot/jtreg/gc/stress/TestStressG1Humongous.java
+
39
−
10
View file @
d5d26be7
...
...
@@ -24,14 +24,41 @@
package
gc.stress
;
/*
* @test
TestStressG1Humongous
* @test
* @key stress
* @summary Stress G1 by humongous allocations in situation near OOM
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run driver/timeout=1300 gc.stress.TestStressG1Humongous
* @run driver/timeout=180 gc.stress.TestStressG1Humongous 4 3 1.1 120
*/
/*
* @test
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run driver/timeout=180 gc.stress.TestStressG1Humongous 16 5 2.1 120
*/
/*
* @test
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run driver/timeout=180 gc.stress.TestStressG1Humongous 32 4 0.6 120
*/
/*
* @test
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run driver/timeout=900 gc.stress.TestStressG1Humongous 1 7 0.6 600
*/
import
java.util.ArrayList
;
...
...
@@ -48,17 +75,19 @@ import jdk.test.lib.process.OutputAnalyzer;
public
class
TestStressG1Humongous
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
if
(
args
.
length
!=
4
)
{
throw
new
IllegalArgumentException
(
"Test expects 4 arguments"
);
}
// Limit heap size on 32-bit platforms
int
heapSize
=
Platform
.
is32bit
()
?
512
:
1024
;
// Heap size, region size, threads, humongous size, timeout
run
(
heapSize
,
4
,
3
,
1.1
,
120
);
run
(
heapSize
,
16
,
5
,
2.1
,
120
);
run
(
heapSize
,
32
,
4
,
0.6
,
120
);
run
(
heapSize
,
1
,
7
,
0.6
,
600
);
}
private
static
void
run
(
int
heapSize
,
int
regionSize
,
int
threads
,
double
humongousSize
,
int
timeout
)
throws
Exception
{
// Region size, threads, humongous size, and timeout passed as @run arguments
int
regionSize
=
Integer
.
parseInt
(
args
[
0
]);
int
threads
=
Integer
.
parseInt
(
args
[
1
]);
double
humongousSize
=
Double
.
parseDouble
(
args
[
2
]);
int
timeout
=
Integer
.
parseInt
(
args
[
3
]);
ArrayList
<
String
>
options
=
new
ArrayList
<>();
Collections
.
addAll
(
options
,
Utils
.
getTestJavaOpts
());
Collections
.
addAll
(
options
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment