8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
Reviewed-by: iignatyev, kbarrett
This commit is contained in:
parent
658f3a7ee9
commit
42e75b8c79
test
hotspot/jtreg
gc
TestAgeOutput.javaTestGenerationPerfCounter.javaTestMemoryInitializationWithCMS.javaTestMemoryMXBeansAndPoolsPresence.javaTestNumWorkerOutput.javaTestSystemGC.java
arguments
TestAlignmentToUseLargePages.javaTestCMSHeapSizeFlags.javaTestMaxNewSize.javaTestUseCompressedOopsErgo.java
class_unloading
cms
DisableResizePLAB.javaGuardShrinkWarning.javaTestBubbleUpRef.javaTestCMSScavengeBeforeRemark.javaTestMBeanCMS.java
concurrent_phase_control
metaspace
startup_warnings
stress
runtime
CompressedOops
MemberName
appcds
serviceability/sa
jdk
ProblemList-graal.txt
com/sun/management/HotSpotDiagnosticMXBean
java/lang/management/MemoryMXBean
CollectionUsageThreshold.javaLowMemoryTest.javaMemoryManagementConcMarkSweepGC.shResetPeakMemoryUsage.java
jdk/jfr/event
gc
collection
TestGCCauseWithCMSConcurrent.javaTestGCCauseWithCMSMarkSweep.javaTestGCEventMixedWithCMSConcurrent.javaTestGCEventMixedWithCMSMarkSweep.javaTestGCEventMixedWithParNew.javaTestYoungGarbageCollectionEventWithParNew.java
detailed
TestCMSConcurrentModeFailureEvent.javaTestPromotionFailedEventWithParNew.javaTestStressAllocationGCEventsWithCMS.javaTestStressAllocationGCEventsWithParNew.javaTestStressBigAllocationGCEventsWithCMS.javaTestStressBigAllocationGCEventsWithParNew.java
heapsummary
objectcount
refstat
stacktrace
oldobject
runtime
jtreg-ext/requires
lib/sun/hotspot/code
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 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
|
||||
@ -32,10 +32,22 @@
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* @run main/othervm -XX:+UseSerialGC TestAgeOutput UseSerialGC
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC TestAgeOutput UseConcMarkSweepGC
|
||||
* @run main/othervm -XX:+UseG1GC TestAgeOutput UseG1GC
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test TestAgeOutputCMS
|
||||
* @bug 8164936
|
||||
* @key gc
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @library /test/lib
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC TestAgeOutput UseConcMarkSweepGC
|
||||
*/
|
||||
|
||||
import sun.hotspot.WhiteBox;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 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
|
||||
@ -38,8 +38,21 @@ import gc.testlibrary.PerfCounters;
|
||||
* @run main/othervm -XX:+UsePerfData -XX:+UseSerialGC TestGenerationPerfCounter
|
||||
* @run main/othervm -XX:+UsePerfData -XX:+UseParallelGC TestGenerationPerfCounter
|
||||
* @run main/othervm -XX:+UsePerfData -XX:+UseG1GC TestGenerationPerfCounter
|
||||
*/
|
||||
|
||||
/* @test TestGenerationPerfCounterCMS
|
||||
* @bug 8080345
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled
|
||||
* @library /test/lib /
|
||||
* @summary Tests that the sun.gc.policy.generations returns 2 for all GCs.
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.compiler
|
||||
* java.management/sun.management
|
||||
* jdk.internal.jvmstat/sun.jvmstat.monitor
|
||||
* @run main/othervm -XX:+UsePerfData -XX:+UseConcMarkSweepGC TestGenerationPerfCounter
|
||||
*/
|
||||
|
||||
public class TestGenerationPerfCounter {
|
||||
public static void main(String[] args) throws Exception {
|
||||
long numGenerations =
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
@ -26,7 +25,7 @@
|
||||
* @test TestMemoryInitializationWithCMS
|
||||
* @key gc
|
||||
* @bug 4668531
|
||||
* @requires vm.debug & vm.gc.ConcMarkSweep
|
||||
* @requires vm.debug & vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary Simple test for -XX:+CheckMemoryInitialization doesn't crash VM
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -XX:+CheckMemoryInitialization TestMemoryInitializationWithCMS
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 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
|
||||
@ -35,11 +35,20 @@ import java.util.stream.*;
|
||||
* java.management
|
||||
* @requires vm.gc == null
|
||||
* @run main/othervm -XX:+UseG1GC TestMemoryMXBeansAndPoolsPresence G1
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC TestMemoryMXBeansAndPoolsPresence CMS
|
||||
* @run main/othervm -XX:+UseParallelGC TestMemoryMXBeansAndPoolsPresence Parallel
|
||||
* @run main/othervm -XX:+UseSerialGC TestMemoryMXBeansAndPoolsPresence Serial
|
||||
*/
|
||||
|
||||
/* @test TestMemoryMXBeansAndPoolsPresenceCMS
|
||||
* @bug 8191564
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc == null & !vm.graal.enabled
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC TestMemoryMXBeansAndPoolsPresence CMS
|
||||
*/
|
||||
|
||||
class GCBeanDescription {
|
||||
public String name;
|
||||
public String[] poolNames;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 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
|
||||
@ -31,10 +31,22 @@
|
||||
* @library /test/lib
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC TestNumWorkerOutput UseConcMarkSweepGC
|
||||
* @run main/othervm -XX:+UseG1GC TestNumWorkerOutput UseG1GC
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test TestNumWorkerOutputCMS
|
||||
* @bug 8165292
|
||||
* @key gc
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @library /test/lib
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC TestNumWorkerOutput UseConcMarkSweepGC
|
||||
*/
|
||||
|
||||
import sun.hotspot.WhiteBox;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -30,14 +30,21 @@
|
||||
* @run main/othervm -XX:+UseSerialGC TestSystemGC
|
||||
* @run main/othervm -XX:+UseParallelGC TestSystemGC
|
||||
* @run main/othervm -XX:+UseParallelGC -XX:-UseParallelOldGC TestSystemGC
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC TestSystemGC
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent TestSystemGC
|
||||
* @run main/othervm -XX:+UseG1GC TestSystemGC
|
||||
* @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent TestSystemGC
|
||||
* @run main/othervm -XX:+UseLargePages TestSystemGC
|
||||
* @run main/othervm -XX:+UseLargePages -XX:+UseLargePagesInMetaspace TestSystemGC
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test TestSystemGCCMS
|
||||
* @key gc
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC TestSystemGC
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent TestSystemGC
|
||||
*/
|
||||
|
||||
public class TestSystemGC {
|
||||
public static void main(String args[]) throws Exception {
|
||||
System.gc();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -34,12 +34,20 @@
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:-UseLargePages TestAlignmentToUseLargePages
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseSerialGC -XX:+UseLargePages TestAlignmentToUseLargePages
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseSerialGC -XX:-UseLargePages TestAlignmentToUseLargePages
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseConcMarkSweepGC -XX:+UseLargePages TestAlignmentToUseLargePages
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseConcMarkSweepGC -XX:-UseLargePages TestAlignmentToUseLargePages
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseG1GC -XX:+UseLargePages TestAlignmentToUseLargePages
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseG1GC -XX:-UseLargePages TestAlignmentToUseLargePages
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test TestAlignmentToUseLargePagesCMS
|
||||
* @key gc regression
|
||||
* @bug 8024396
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseConcMarkSweepGC -XX:+UseLargePages TestAlignmentToUseLargePages
|
||||
* @run main/othervm -Xms71M -Xmx91M -XX:+UseConcMarkSweepGC -XX:-UseLargePages TestAlignmentToUseLargePages
|
||||
*/
|
||||
|
||||
public class TestAlignmentToUseLargePages {
|
||||
public static void main(String args[]) throws Exception {
|
||||
// nothing to do
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -25,7 +25,7 @@
|
||||
* @test TestCMSHeapSizeFlags
|
||||
* @key gc
|
||||
* @bug 8006088
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary Tests argument processing for initial and maximum heap size for the CMS collector
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -27,16 +27,28 @@
|
||||
* @bug 7057939
|
||||
* @summary Make sure that MaxNewSize always has a useful value after argument
|
||||
* processing.
|
||||
* @requires vm.gc=="null"
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
* @run main TestMaxNewSize -XX:+UseSerialGC
|
||||
* @run main TestMaxNewSize -XX:+UseParallelGC
|
||||
* @run main TestMaxNewSize -XX:+UseConcMarkSweepGC
|
||||
* @run main TestMaxNewSize -XX:+UseG1GC
|
||||
* @author thomas.schatzl@oracle.com, jesper.wilhelmsson@oracle.com
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test TestMaxNewSizeCMS
|
||||
* @key gc
|
||||
* @bug 7057939
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
* @run main TestMaxNewSize -XX:+UseConcMarkSweepGC
|
||||
*/
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -26,6 +26,7 @@
|
||||
* @key gc
|
||||
* @bug 8010722
|
||||
* @summary Tests ergonomics for UseCompressedOops.
|
||||
* @requires vm.gc=="null"
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management/sun.management
|
||||
@ -35,10 +36,24 @@
|
||||
* @run main/othervm TestUseCompressedOopsErgo -XX:+UseG1GC
|
||||
* @run main/othervm TestUseCompressedOopsErgo -XX:+UseParallelGC
|
||||
* @run main/othervm TestUseCompressedOopsErgo -XX:+UseParallelGC -XX:-UseParallelOldGC
|
||||
* @run main/othervm TestUseCompressedOopsErgo -XX:+UseConcMarkSweepGC
|
||||
* @run main/othervm TestUseCompressedOopsErgo -XX:+UseSerialGC
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test TestUseCompressedOopsErgoCMS
|
||||
* @key gc
|
||||
* @bug 8010722
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management/sun.management
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm TestUseCompressedOopsErgo -XX:+UseConcMarkSweepGC
|
||||
*/
|
||||
|
||||
public class TestUseCompressedOopsErgo {
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 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
|
||||
@ -25,6 +25,7 @@
|
||||
* @test
|
||||
* @key gc
|
||||
* @bug 8049831
|
||||
* @requires !vm.graal.enabled
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 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
|
||||
@ -44,6 +44,22 @@
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:-ClassUnloading -XX:+UseParallelGC TestClassUnloadingDisabled
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @key gc
|
||||
* @bug 8114823
|
||||
* @comment Graal does not support CMS
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled
|
||||
* @requires vm.opt.ExplicitGCInvokesConcurrent != true
|
||||
* @requires vm.opt.ClassUnloading != true
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:-ClassUnloading -XX:+UseConcMarkSweepGC TestClassUnloadingDisabled
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 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
|
||||
@ -26,7 +26,7 @@
|
||||
* @key gc
|
||||
* @bug 8060467
|
||||
* @author filipp.zhinkin@oracle.com, john.coomes@oracle.com
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary Run CMS with PLAB resizing disabled and a small OldPLABSize
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -Xlog:gc=debug DisableResizePLAB
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -26,6 +26,7 @@
|
||||
* @key gc regression
|
||||
* @summary Remove warning about CMS generation shrinking.
|
||||
* @bug 8012111
|
||||
* @requires !vm.graal.enabled
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 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
|
||||
@ -28,7 +28,7 @@ import java.util.ListIterator;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @key cte_test
|
||||
* @bug 4950157
|
||||
* @summary Stress the behavior of ergonomics when the heap is nearly full and
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 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
|
||||
@ -25,7 +25,7 @@
|
||||
* @test TestCMSScavengeBeforeRemark
|
||||
* @key gc
|
||||
* @bug 8139868
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary Run CMS with CMSScavengeBeforeRemark
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -XX:+CMSScavengeBeforeRemark -XX:+ExplicitGCInvokesConcurrent -Xmx256m -Xlog:gc=debug TestCMSScavengeBeforeRemark
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 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
|
||||
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test TestMBeanCMS.java
|
||||
* @bug 6581734
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary CMS Old Gen's collection usage is zero after GC which is incorrect
|
||||
* @modules java.management
|
||||
* @run main/othervm -Xmx512m -verbose:gc -XX:+UseConcMarkSweepGC TestMBeanCMS
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 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
|
||||
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test TestConcurrentPhaseControlCMS
|
||||
* @bug 8169517
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary Verify CMS GC doesn't support WhiteBox concurrent phase control.
|
||||
* @key gc
|
||||
* @modules java.base
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 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
|
||||
@ -28,6 +28,7 @@ import sun.hotspot.WhiteBox;
|
||||
/* @test TestMetaspaceCMSCancel
|
||||
* @bug 8026752
|
||||
* @summary Tests cancel of CMS concurrent cycle for Metaspace after a full GC
|
||||
* @requires !vm.graal.enabled
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @build sun.hotspot.WhiteBox
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -22,14 +22,15 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test TestCMS
|
||||
* @key gc
|
||||
* @bug 8006398 8155948 8179013
|
||||
* @summary Test that CMS prints a warning message
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
*/
|
||||
* @test TestCMS
|
||||
* @key gc
|
||||
* @bug 8006398 8155948 8179013
|
||||
* @summary Test that CMS prints a warning message
|
||||
* @requires !vm.graal.enabled
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
*/
|
||||
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
@ -25,8 +25,7 @@
|
||||
* @test TestReclaimStringsLeaksMemory
|
||||
* @bug 8180048
|
||||
* @summary Ensure that during a Full GC interned string memory is reclaimed completely.
|
||||
* @requires vm.gc=="null"
|
||||
* @requires !vm.debug
|
||||
* @requires vm.gc=="null" & !vm.graal.enabled & !vm.debug
|
||||
* @key gc
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 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
|
||||
@ -28,7 +28,7 @@ import java.io.IOException;
|
||||
* @test TestGCBasherWithCMS
|
||||
* @key gc stress
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.flavor == "server" & !vm.emulatedClient
|
||||
* @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
|
||||
* @summary Stress the CMS GC by trying to make old objects more likely to be garbage than young objects.
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx256m -server -XX:+UseConcMarkSweepGC TestGCBasherWithCMS 120000
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 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
|
||||
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* @test TestGCLockerWithCMS
|
||||
* @key gc
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary Stress CMS' GC locker by calling GetPrimitiveArrayCritical while concurrently filling up old gen.
|
||||
* @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms1500m -Xmx1500m -XX:+UseConcMarkSweepGC TestGCLockerWithCMS
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 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
|
||||
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* @test TestGCOldWithCMS
|
||||
* @key gc
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary Stress the CMS GC by trying to make old objects more likely to be garbage than young objects.
|
||||
* @run main/othervm -Xmx384M -XX:+UseConcMarkSweepGC TestGCOldWithCMS 50 1 20 10 10000
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 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
|
||||
@ -26,7 +26,7 @@
|
||||
* @test TestSystemGCWithCMS
|
||||
* @key gc stress
|
||||
* @bug 8190703
|
||||
* @requires vm.gc.ConcMarkSweep
|
||||
* @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
|
||||
* @summary Stress the CMS GC full GC by allocating objects of different lifetimes concurrently with System.gc().
|
||||
* @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UseConcMarkSweepGC TestSystemGCWithCMS 270
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 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
|
||||
@ -28,7 +28,9 @@
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
* @run main UseCompressedOops
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. UseCompressedOops
|
||||
*/
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -36,6 +38,8 @@ import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
||||
public class UseCompressedOops {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
@ -51,7 +55,9 @@ public class UseCompressedOops {
|
||||
testCompressedOopsModes(args);
|
||||
// Test GCs.
|
||||
testCompressedOopsModes(args, "-XX:+UseG1GC");
|
||||
testCompressedOopsModes(args, "-XX:+UseConcMarkSweepGC");
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
testCompressedOopsModes(args, "-XX:+UseConcMarkSweepGC");
|
||||
}
|
||||
testCompressedOopsModes(args, "-XX:+UseSerialGC");
|
||||
testCompressedOopsModes(args, "-XX:+UseParallelGC");
|
||||
testCompressedOopsModes(args, "-XX:+UseParallelOldGC");
|
||||
|
@ -26,13 +26,17 @@
|
||||
* @bug 8174749
|
||||
* @summary MemberNameTable should reuse entries
|
||||
* @library /test/lib
|
||||
* @run main MemberNameLeak
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. MemberNameLeak
|
||||
*/
|
||||
|
||||
import java.lang.invoke.*;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
||||
public class MemberNameLeak {
|
||||
static class Leak {
|
||||
public void callMe() {
|
||||
@ -69,6 +73,8 @@ public class MemberNameLeak {
|
||||
test("-XX:+UseG1GC");
|
||||
test("-XX:+UseParallelGC");
|
||||
test("-XX:+UseSerialGC");
|
||||
test("-XX:+UseConcMarkSweepGC");
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
test("-XX:+UseConcMarkSweepGC");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 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
|
||||
@ -32,14 +32,18 @@
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
* jdk.jartool/sun.tools.jar
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @compile test-classes/Hello.java
|
||||
* @run main/timeout=240 CommandLineFlagCombo
|
||||
* @run main/othervm/timeout=240 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. CommandLineFlagCombo
|
||||
*/
|
||||
|
||||
import jdk.test.lib.BuildHelper;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
||||
public class CommandLineFlagCombo {
|
||||
|
||||
// shared base address test table
|
||||
@ -122,6 +126,11 @@ public class CommandLineFlagCombo {
|
||||
System.out.println("Test case not applicable on non-commercial builds");
|
||||
return true;
|
||||
}
|
||||
if (Compiler.isGraalEnabled() && testEntry.equals("-XX:+UseConcMarkSweepGC"))
|
||||
{
|
||||
System.out.println("Graal does not support CMS");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -32,13 +32,17 @@
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* @modules java.management
|
||||
* jdk.jartool/sun.tools.jar
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @build HelloString
|
||||
* @run main IncompatibleOptions
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions
|
||||
*/
|
||||
|
||||
import jdk.test.lib.Asserts;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
||||
public class IncompatibleOptions {
|
||||
static final String COOPS_DUMP_WARNING =
|
||||
"Cannot dump shared archive when UseCompressedOops or UseCompressedClassPointers is off";
|
||||
@ -62,7 +66,9 @@ public class IncompatibleOptions {
|
||||
// incompatible GCs
|
||||
testDump(2, "-XX:+UseParallelGC", "", GC_WARNING, false);
|
||||
testDump(3, "-XX:+UseSerialGC", "", GC_WARNING, false);
|
||||
testDump(4, "-XX:+UseConcMarkSweepGC", "", GC_WARNING, false);
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
testDump(4, "-XX:+UseConcMarkSweepGC", "", GC_WARNING, false);
|
||||
}
|
||||
|
||||
// ======= archive with compressed oops, run w/o
|
||||
testDump(5, "-XX:+UseG1GC", "-XX:+UseCompressedOops", null, false);
|
||||
@ -73,7 +79,9 @@ public class IncompatibleOptions {
|
||||
// Still run, to ensure no crash or exception
|
||||
testExec(6, "-XX:+UseParallelGC", "", "", false);
|
||||
testExec(7, "-XX:+UseSerialGC", "", "", false);
|
||||
testExec(8, "-XX:+UseConcMarkSweepGC", "", "", false);
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
testExec(8, "-XX:+UseConcMarkSweepGC", "", "", false);
|
||||
}
|
||||
|
||||
// Test various oops encodings, by varying ObjectAlignmentInBytes and heap sizes
|
||||
testDump(9, "-XX:+UseG1GC", "-XX:ObjectAlignmentInBytes=8", null, false);
|
||||
|
@ -21,6 +21,8 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
@ -37,7 +39,9 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
* @bug 8190307
|
||||
* @library /test/lib
|
||||
* @build jdk.test.lib.apps.*
|
||||
* @run main/othervm TestUniverse
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. TestUniverse
|
||||
*/
|
||||
|
||||
public class TestUniverse {
|
||||
@ -132,7 +136,9 @@ public class TestUniverse {
|
||||
test("-XX:+UseG1GC");
|
||||
test("-XX:+UseParallelGC");
|
||||
test("-XX:+UseSerialGC");
|
||||
test("-XX:+UseConcMarkSweepGC");
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
test("-XX:+UseConcMarkSweepGC");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new Error("Test failed with " + e);
|
||||
}
|
||||
|
@ -68,3 +68,9 @@ java/util/concurrent/tck/JSR166TestCase.java 8187486
|
||||
java/lang/ref/OOMEInReferenceHandler.java 8196611 generic-all
|
||||
java/lang/Runtime/exec/LotsOfOutput.java 8196611 generic-all
|
||||
java/util/concurrent/ScheduledThreadPoolExecutor/BasicCancelTest.java 8196611 generic-all
|
||||
|
||||
# Next JFR tests fail with Graal. Assuming 8193210.
|
||||
jdk/jfr/event/compiler/TestCodeSweeper.java 8193210 generic-all
|
||||
jdk/jfr/event/compiler/TestCompilerInlining.java 8193210 generic-all
|
||||
jdk/jfr/event/compiler/TestCompilerPhase.java 8193210 generic-all
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -25,6 +25,8 @@
|
||||
* @test
|
||||
* @bug 8028994
|
||||
* @author Staffan Larsen
|
||||
* @comment Graal does not support CMS
|
||||
* @requires !vm.graal.enabled
|
||||
* @library /lib/testlibrary
|
||||
* @modules jdk.attach/sun.tools.attach
|
||||
* jdk.management
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -30,11 +30,13 @@
|
||||
*
|
||||
* @author Mandy Chung
|
||||
*
|
||||
* @library /lib/testlibrary/
|
||||
* @library /lib/testlibrary/ /test/lib
|
||||
* @modules jdk.management
|
||||
* @build jdk.testlibrary.* CollectionUsageThreshold MemoryUtil RunUtil
|
||||
* @requires vm.opt.ExplicitGCInvokesConcurrent == "false" | vm.opt.ExplicitGCInvokesConcurrent == "null"
|
||||
* @run main/timeout=300 CollectionUsageThreshold
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm/timeout=300 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. CollectionUsageThreshold
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
@ -46,6 +48,8 @@ import java.lang.management.*;
|
||||
import static java.lang.management.MemoryNotificationInfo.*;;
|
||||
import static java.lang.management.ManagementFactory.*;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
||||
public class CollectionUsageThreshold {
|
||||
private static final MemoryMXBean mm = getMemoryMXBean();
|
||||
private static final Map<String, PoolRecord> result = new HashMap<>();
|
||||
@ -72,7 +76,9 @@ public class CollectionUsageThreshold {
|
||||
RunUtil.runTestClearGcOpts(main, "-XX:+UseSerialGC");
|
||||
RunUtil.runTestClearGcOpts(main, "-XX:+UseParallelGC");
|
||||
RunUtil.runTestClearGcOpts(main, "-XX:+UseG1GC");
|
||||
RunUtil.runTestClearGcOpts(main, "-XX:+UseConcMarkSweepGC");
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
RunUtil.runTestClearGcOpts(main, "-XX:+UseConcMarkSweepGC");
|
||||
}
|
||||
}
|
||||
|
||||
static class PoolRecord {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -32,10 +32,12 @@
|
||||
* @requires vm.gc == "null"
|
||||
* @requires vm.opt.ExplicitGCInvokesConcurrent != "true"
|
||||
* @requires vm.opt.DisableExplicitGC != "true"
|
||||
* @library /lib/testlibrary/
|
||||
* @library /lib/testlibrary/ /test/lib
|
||||
*
|
||||
* @build jdk.testlibrary.* LowMemoryTest MemoryUtil RunUtil
|
||||
* @run main/timeout=600 LowMemoryTest
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm/timeout=600 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. LowMemoryTest
|
||||
*/
|
||||
|
||||
import java.lang.management.*;
|
||||
@ -47,6 +49,8 @@ import jdk.testlibrary.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.testlibrary.Utils;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
||||
public class LowMemoryTest {
|
||||
private static final MemoryMXBean mm = ManagementFactory.getMemoryMXBean();
|
||||
private static final List<MemoryPoolMXBean> pools = ManagementFactory.getMemoryPoolMXBeans();
|
||||
@ -80,7 +84,9 @@ public class LowMemoryTest {
|
||||
traceTest(classMain + ", -XX:+UseSerialGC", nmFlag, lpFlag, "-XX:+UseSerialGC");
|
||||
traceTest(classMain + ", -XX:+UseParallelGC", nmFlag, lpFlag, "-XX:+UseParallelGC");
|
||||
traceTest(classMain + ", -XX:+UseG1GC", nmFlag, lpFlag, "-XX:+UseG1GC", g1Flag);
|
||||
traceTest(classMain + ", -XX:+UseConcMarkSweepGC", nmFlag, lpFlag, "-XX:+UseConcMarkSweepGC");
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
traceTest(classMain + ", -XX:+UseConcMarkSweepGC", nmFlag, lpFlag, "-XX:+UseConcMarkSweepGC");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 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
|
||||
@ -27,7 +27,7 @@
|
||||
# @summary Run MemoryManagement test with concurrent mark sweep GC
|
||||
# @author Mandy Chung
|
||||
#
|
||||
# @requires vm.gc=="ConcMarkSweep" | vm.gc=="null"
|
||||
# @requires (vm.gc=="ConcMarkSweep" | vm.gc=="null") & !vm.graal.enabled
|
||||
#
|
||||
# @run build MemoryManagement
|
||||
# @run shell/timeout=600 MemoryManagementConcMarkSweepGC.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -34,17 +34,21 @@
|
||||
*
|
||||
* @requires vm.opt.ExplicitGCInvokesConcurrent != "true"
|
||||
* @requires vm.opt.DisableExplicitGC != "true"
|
||||
* @library /lib/testlibrary/
|
||||
* @library /lib/testlibrary/ /test/lib
|
||||
* @modules jdk.management
|
||||
*
|
||||
* @build jdk.testlibrary.* ResetPeakMemoryUsage MemoryUtil RunUtil
|
||||
* @run main ResetPeakMemoryUsage
|
||||
* @build sun.hotspot.WhiteBox
|
||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. ResetPeakMemoryUsage
|
||||
*/
|
||||
|
||||
import java.lang.management.*;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.*;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
||||
public class ResetPeakMemoryUsage {
|
||||
private static MemoryMXBean mbean = ManagementFactory.getMemoryMXBean();
|
||||
// make public so that it can't be optimized away easily
|
||||
@ -59,7 +63,9 @@ public class ResetPeakMemoryUsage {
|
||||
final String main = "ResetPeakMemoryUsage$TestMain";
|
||||
final String ms = "-Xms256m";
|
||||
final String mn = "-Xmn8m";
|
||||
RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseConcMarkSweepGC");
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseConcMarkSweepGC");
|
||||
}
|
||||
RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseParallelGC");
|
||||
RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseG1GC", "-XX:G1HeapRegionSize=1m");
|
||||
RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseSerialGC",
|
||||
|
@ -29,7 +29,7 @@ import jdk.test.lib.jfr.GCHelper;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires vm.gc == "ConcMarkSweep" | vm.gc == null
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* @requires vm.opt.ExplicitGCInvokesConcurrent != false
|
||||
* @library /test/lib /test/jdk
|
||||
* @run driver jdk.jfr.event.gc.collection.TestGCCauseWithCMSConcurrent
|
||||
|
@ -30,7 +30,7 @@ import jdk.test.lib.jfr.GCHelper;
|
||||
* @test
|
||||
* @key jfr
|
||||
*
|
||||
* @requires vm.gc == "ConcMarkSweep" | vm.gc == null
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* @requires vm.opt.ExplicitGCInvokesConcurrent != true
|
||||
* @library /test/lib /test/jdk
|
||||
* @run driver jdk.jfr.event.gc.collection.TestGCCauseWithCMSMarkSweep
|
||||
|
@ -29,7 +29,7 @@ package jdk.jfr.event.gc.collection;
|
||||
* @test
|
||||
* @key jfr
|
||||
*
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null)
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* & vm.opt.ExplicitGCInvokesConcurrent != false
|
||||
* @library /test/lib /test/jdk
|
||||
*
|
||||
|
@ -29,7 +29,7 @@ package jdk.jfr.event.gc.collection;
|
||||
* @test
|
||||
* @key jfr
|
||||
*
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null)
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* & vm.opt.ExplicitGCInvokesConcurrent != true
|
||||
* @library /test/lib /test/jdk
|
||||
*
|
||||
|
@ -29,7 +29,7 @@ package jdk.jfr.event.gc.collection;
|
||||
* @test
|
||||
* @key jfr
|
||||
*
|
||||
* @requires vm.gc == "ConcMarkSweep" | vm.gc == null
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -Xmx32m -Xmn8m -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -XX:+UseConcMarkSweepGC jdk.jfr.event.gc.collection.TestGCEventMixedWithParNew
|
||||
* good debug flags: -Xlog:gc*=debug
|
||||
|
@ -28,7 +28,7 @@ package jdk.jfr.event.gc.collection;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires vm.gc == "ConcMarkSweep" | vm.gc == null
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -Xmx50m -Xmn2m -XX:+UseConcMarkSweepGC -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -Xlog:gc+heap=trace,gc*=debug jdk.jfr.event.gc.collection.TestYoungGarbageCollectionEventWithParNew
|
||||
*/
|
||||
|
@ -42,7 +42,7 @@ import jdk.test.lib.jfr.EventNames;
|
||||
* @test
|
||||
* @key jfr
|
||||
*
|
||||
* @requires vm.gc == "ConcMarkSweep" | vm.gc == null
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
*
|
||||
* @run main jdk.jfr.event.gc.detailed.TestCMSConcurrentModeFailureEvent
|
||||
|
@ -27,7 +27,7 @@ package jdk.jfr.event.gc.detailed;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires vm.gc == "ConcMarkSweep" | vm.gc == null
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm jdk.jfr.event.gc.detailed.TestPromotionFailedEventWithParNew
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ package jdk.jfr.event.gc.detailed;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @requires vm.gc == "null" | vm.gc == "ConcMarkSweep"
|
||||
* @requires (vm.gc == "null" | vm.gc == "ConcMarkSweep") & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -Xmx64m jdk.jfr.event.gc.detailed.TestStressAllocationGCEventsWithCMS
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ package jdk.jfr.event.gc.detailed;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @requires vm.gc == "null"
|
||||
* @requires vm.gc == "null" & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -Xmx64m jdk.jfr.event.gc.detailed.TestStressAllocationGCEventsWithParNew
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ package jdk.jfr.event.gc.detailed;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @requires vm.gc == "null" | vm.gc == "ConcMarkSweep"
|
||||
* @requires (vm.gc == "null" | vm.gc == "ConcMarkSweep") & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -Xmx256m jdk.jfr.event.gc.detailed.TestStressBigAllocationGCEventsWithCMS 1048576
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ package jdk.jfr.event.gc.detailed;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @requires vm.gc == "null"
|
||||
* @requires vm.gc == "null" & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -Xmx256m jdk.jfr.event.gc.detailed.TestStressBigAllocationGCEventsWithParNew 1048576
|
||||
*/
|
||||
|
@ -38,7 +38,7 @@ import jdk.test.lib.jfr.GCHelper;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null)
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* & vm.opt.ExplicitGCInvokesConcurrent != false
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent jdk.jfr.event.gc.heapsummary.TestHeapSummaryEventConcurrentCMS
|
||||
|
@ -29,7 +29,7 @@ import jdk.test.lib.jfr.GCHelper;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null)
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* & vm.opt.ExplicitGCInvokesConcurrent != true
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -XX:+UseConcMarkSweepGC jdk.jfr.event.gc.heapsummary.TestHeapSummaryEventParNewCMS
|
||||
|
@ -29,7 +29,7 @@ import jdk.test.lib.jfr.GCHelper;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null)
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* & vm.opt.ExplicitGCInvokesConcurrent != false
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:MarkSweepDeadRatio=0 -XX:-UseCompressedOops -XX:+IgnoreUnrecognizedVMOptions jdk.jfr.event.gc.objectcount.TestObjectCountAfterGCEventWithCMSConcurrent
|
||||
|
@ -29,7 +29,7 @@ import jdk.test.lib.jfr.GCHelper;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null)
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* & vm.opt.ExplicitGCInvokesConcurrent != true
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -XX:+UseConcMarkSweepGC -XX:MarkSweepDeadRatio=0 -XX:-UseCompressedOops -XX:+IgnoreUnrecognizedVMOptions jdk.jfr.event.gc.objectcount.TestObjectCountAfterGCEventWithCMSMarkSweep
|
||||
|
@ -29,7 +29,7 @@ import jdk.test.lib.jfr.GCHelper;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null)
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* & vm.opt.ExplicitGCInvokesConcurrent != false
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -Xlog:gc+heap=trace,gc*=debug -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent jdk.jfr.event.gc.refstat.TestRefStatEventWithCMSConcurrent
|
||||
|
@ -29,7 +29,7 @@ import jdk.test.lib.jfr.GCHelper;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null)
|
||||
* @requires (vm.gc == "ConcMarkSweep" | vm.gc == null) & !vm.graal.enabled
|
||||
* & vm.opt.ExplicitGCInvokesConcurrent != true
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -Xlog:gc+heap=trace,gc*=debug -XX:+UseConcMarkSweepGC jdk.jfr.event.gc.refstat.TestRefStatEventWithCMSMarkSweep
|
||||
|
@ -28,7 +28,7 @@ package jdk.jfr.event.gc.stacktrace;
|
||||
* @test
|
||||
* @key jfr
|
||||
*
|
||||
* @requires vm.gc == "null" | vm.gc == "ConcMarkSweep"
|
||||
* @requires (vm.gc == "null" | vm.gc == "ConcMarkSweep") & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:MaxNewSize=10M -Xmx64M -XX:+UseConcMarkSweepGC -Xlog:gc* jdk.jfr.event.gc.stacktrace.TestConcMarkSweepAllocationPendingStackTrace
|
||||
*/
|
||||
|
@ -28,7 +28,7 @@ package jdk.jfr.event.gc.stacktrace;
|
||||
* @test
|
||||
* @key jfr
|
||||
*
|
||||
* @requires vm.gc == "null" | vm.gc == "ConcMarkSweep"
|
||||
* @requires (vm.gc == "null" | vm.gc == "ConcMarkSweep") & !vm.graal.enabled
|
||||
* @requires !(vm.compMode == "Xcomp" & os.arch == "aarch64")
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -XX:MaxMetaspaceSize=64M -Xlog:gc* jdk.jfr.event.gc.stacktrace.TestMetaspaceConcMarkSweepGCAllocationPendingStackTrace
|
||||
|
@ -28,7 +28,7 @@ package jdk.jfr.event.gc.stacktrace;
|
||||
* @test
|
||||
* @key jfr
|
||||
*
|
||||
* @requires vm.gc == "null" | vm.gc == "ConcMarkSweep"
|
||||
* @requires (vm.gc == "null" | vm.gc == "ConcMarkSweep") & !vm.graal.enabled
|
||||
* @library /test/lib /test/jdk
|
||||
* @run main/othervm -XX:+UseConcMarkSweepGC -Xlog:gc* -XX:+FlightRecorder jdk.jfr.event.gc.stacktrace.TestParNewAllocationPendingStackTrace
|
||||
*/
|
||||
|
@ -37,7 +37,7 @@ import jdk.test.lib.jfr.Events;
|
||||
/*
|
||||
* @test
|
||||
* @key jfr
|
||||
* @requires vm.gc == "null"
|
||||
* @requires vm.gc == "null" & !vm.graal.enabled
|
||||
* @summary Test leak profiler with CMS GC
|
||||
* @library /test/lib /test/jdk
|
||||
* @modules jdk.jfr/jdk.jfr.internal.test
|
||||
|
@ -40,6 +40,7 @@ import jdk.test.lib.jfr.Events;
|
||||
* @test
|
||||
* @summary Tests the JFR events related to modules
|
||||
* @key jfr
|
||||
* @requires !vm.graal.enabled
|
||||
* @library /test/lib
|
||||
* @run main/othervm --limit-modules java.base,jdk.jfr jdk.jfr.event.runtime.TestModuleEvents
|
||||
*/
|
||||
|
@ -36,6 +36,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
import sun.hotspot.cpuinfo.CPUInfo;
|
||||
import sun.hotspot.gc.GC;
|
||||
import sun.hotspot.WhiteBox;
|
||||
@ -344,33 +345,7 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
* @return true if Graal is used as JIT compiler.
|
||||
*/
|
||||
protected String isGraalEnabled() {
|
||||
// Graal is enabled if following conditions are true:
|
||||
// - we are not in Interpreter mode
|
||||
// - UseJVMCICompiler flag is true
|
||||
// - jvmci.Compiler variable is equal to 'graal'
|
||||
// - TieredCompilation is not used or TieredStopAtLevel is greater than 3
|
||||
|
||||
Boolean useCompiler = WB.getBooleanVMFlag("UseCompiler");
|
||||
if (useCompiler == null || !useCompiler)
|
||||
return "false";
|
||||
|
||||
Boolean useJvmciComp = WB.getBooleanVMFlag("UseJVMCICompiler");
|
||||
if (useJvmciComp == null || !useJvmciComp)
|
||||
return "false";
|
||||
|
||||
// This check might be redundant but let's keep it for now.
|
||||
String jvmciCompiler = System.getProperty("jvmci.Compiler");
|
||||
if (jvmciCompiler == null || !jvmciCompiler.equals("graal")) {
|
||||
return "false";
|
||||
}
|
||||
|
||||
Boolean tieredCompilation = WB.getBooleanVMFlag("TieredCompilation");
|
||||
Long compLevel = WB.getIntxVMFlag("TieredStopAtLevel");
|
||||
// if TieredCompilation is enabled and compilation level is <= 3 then no Graal is used
|
||||
if (tieredCompilation != null && tieredCompilation && compLevel != null && compLevel <= 3)
|
||||
return "false";
|
||||
|
||||
return "true";
|
||||
return Compiler.isGraalEnabled() ? "true" : "false";
|
||||
}
|
||||
|
||||
|
||||
|
136
test/lib/sun/hotspot/code/Compiler.java
Normal file
136
test/lib/sun/hotspot/code/Compiler.java
Normal file
@ -0,0 +1,136 @@
|
||||
/*
|
||||
* Copyright (c) 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.code;
|
||||
|
||||
import sun.hotspot.WhiteBox;
|
||||
|
||||
/**
|
||||
* API to obtain information about enabled JIT compilers
|
||||
* retrieved from the VM with the WhiteBox API.
|
||||
*/
|
||||
public class Compiler {
|
||||
|
||||
private static final WhiteBox WB = WhiteBox.getWhiteBox();
|
||||
|
||||
/**
|
||||
* Check if Graal is used as JIT compiler.
|
||||
*
|
||||
* Graal is enabled if following conditions are true:
|
||||
* - we are not in Interpreter mode
|
||||
* - UseJVMCICompiler flag is true
|
||||
* - jvmci.Compiler variable is equal to 'graal'
|
||||
* - TieredCompilation is not used or TieredStopAtLevel is greater than 3
|
||||
* No need to check client mode because it set UseJVMCICompiler to false.
|
||||
*
|
||||
* @return true if Graal is used as JIT compiler.
|
||||
*/
|
||||
public static boolean isGraalEnabled() {
|
||||
Boolean useCompiler = WB.getBooleanVMFlag("UseCompiler");
|
||||
if (useCompiler == null || !useCompiler) {
|
||||
return false;
|
||||
}
|
||||
Boolean useJvmciComp = WB.getBooleanVMFlag("UseJVMCICompiler");
|
||||
if (useJvmciComp == null || !useJvmciComp) {
|
||||
return false;
|
||||
}
|
||||
// This check might be redundant but let's keep it for now.
|
||||
String jvmciCompiler = System.getProperty("jvmci.Compiler");
|
||||
if (jvmciCompiler == null || !jvmciCompiler.equals("graal")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Boolean tieredCompilation = WB.getBooleanVMFlag("TieredCompilation");
|
||||
Long compLevel = WB.getIntxVMFlag("TieredStopAtLevel");
|
||||
// if TieredCompilation is enabled and compilation level is <= 3 then no Graal is used
|
||||
if (tieredCompilation != null && tieredCompilation &&
|
||||
compLevel != null && compLevel <= 3) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if C2 is used as JIT compiler.
|
||||
*
|
||||
* C2 is enabled if following conditions are true:
|
||||
* - we are not in Interpreter mode
|
||||
* - we are in Server compilation mode
|
||||
* - TieredCompilation is not used or TieredStopAtLevel is greater than 3
|
||||
* - Graal is not used
|
||||
*
|
||||
* @return true if C2 is used as JIT compiler.
|
||||
*/
|
||||
public static boolean isC2Enabled() {
|
||||
Boolean useCompiler = WB.getBooleanVMFlag("UseCompiler");
|
||||
if (useCompiler == null || !useCompiler) {
|
||||
return false;
|
||||
}
|
||||
Boolean serverMode = WB.getBooleanVMFlag("ProfileInterpreter");
|
||||
if (serverMode == null || !serverMode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Boolean tieredCompilation = WB.getBooleanVMFlag("TieredCompilation");
|
||||
Long compLevel = WB.getIntxVMFlag("TieredStopAtLevel");
|
||||
// if TieredCompilation is enabled and compilation level is <= 3 then no Graal is used
|
||||
if (tieredCompilation != null && tieredCompilation &&
|
||||
compLevel != null && compLevel <= 3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isGraalEnabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if C1 is used as JIT compiler.
|
||||
*
|
||||
* C1 is enabled if following conditions are true:
|
||||
* - we are not in Interpreter mode
|
||||
* - we are not in Server compilation mode
|
||||
* - TieredCompilation is used in Server mode
|
||||
*
|
||||
* @return true if C1 is used as JIT compiler.
|
||||
*/
|
||||
public static boolean isC1Enabled() {
|
||||
Boolean useCompiler = WB.getBooleanVMFlag("UseCompiler");
|
||||
if (useCompiler == null || !useCompiler) {
|
||||
return false;
|
||||
}
|
||||
Boolean serverMode = WB.getBooleanVMFlag("ProfileInterpreter");
|
||||
if (serverMode == null || !serverMode) {
|
||||
return true; // Client mode
|
||||
}
|
||||
|
||||
Boolean tieredCompilation = WB.getBooleanVMFlag("TieredCompilation");
|
||||
// C1 is not used in server mode if TieredCompilation is off.
|
||||
if (tieredCompilation != null && !tieredCompilation) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user