8187819: gc/TestFullGCALot.java fails on jdk10 started with "-XX:-UseCompressedOops" option
authoraharlap
Thu, 16 Nov 2017 14:06:44 -0500
changeset 48092 72855b7d10ac
parent 48091 b936dd383b25
child 48093 2cb07c3778e1
8187819: gc/TestFullGCALot.java fails on jdk10 started with "-XX:-UseCompressedOops" option Summary: Need to initialized metaspace performance counters before their potential use Reviewed-by: tschatzl, sjohanss
src/hotspot/share/memory/universe.cpp
test/hotspot/jtreg/gc/TestFullGCALot.java
--- a/src/hotspot/share/memory/universe.cpp	Mon Nov 13 15:28:17 2017 +0100
+++ b/src/hotspot/share/memory/universe.cpp	Thu Nov 16 14:06:44 2017 -0500
@@ -687,6 +687,10 @@
 
   Metaspace::global_initialize();
 
+  // Initialize performance counters for metaspaces
+  MetaspaceCounters::initialize_performance_counters();
+  CompressedClassSpaceCounters::initialize_performance_counters();
+
   AOTLoader::universe_init();
 
   // Checks 'AfterMemoryInit' constraints.
@@ -1085,10 +1089,6 @@
   // ("weak") refs processing infrastructure initialization
   Universe::heap()->post_initialize();
 
-  // Initialize performance counters for metaspaces
-  MetaspaceCounters::initialize_performance_counters();
-  CompressedClassSpaceCounters::initialize_performance_counters();
-
   MemoryService::add_metaspace_memory_pools();
 
   MemoryService::set_universe_heap(Universe::heap());
--- a/test/hotspot/jtreg/gc/TestFullGCALot.java	Mon Nov 13 15:28:17 2017 +0100
+++ b/test/hotspot/jtreg/gc/TestFullGCALot.java	Thu Nov 16 14:06:44 2017 -0500
@@ -24,7 +24,7 @@
 /*
  * @test TestFullGCALot
  * @key gc
- * @bug 4187687
+ * @bug 4187687 8187819
  * @summary Ensure no access violation when using FullGCALot
  * @requires vm.debug
  * @run main/othervm -XX:NewSize=10m -XX:+FullGCALot -XX:FullGCALotInterval=120 TestFullGCALot