8214356: Verification of class metadata unloading takes a long time
authorcoleenp
Thu, 29 Nov 2018 13:04:25 -0500
changeset 52767 db7a459e10eb
parent 52766 26b7f3038e27
child 52768 fa5ef7aa0393
8214356: Verification of class metadata unloading takes a long time Summary: conditionalize verify_chunk_in_freelist call. Reviewed-by: shade, tschatzl
src/hotspot/share/memory/binaryTreeDictionary.inline.hpp
test/hotspot/jtreg/vmTestbase/metaspace/stressDictionary/StressDictionary.java
--- a/src/hotspot/share/memory/binaryTreeDictionary.inline.hpp	Thu Nov 29 10:13:42 2018 -0800
+++ b/src/hotspot/share/memory/binaryTreeDictionary.inline.hpp	Thu Nov 29 13:04:25 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -229,7 +229,8 @@
   assert(chunk->list() == this, "list should be set for chunk");
   assert(tail() != NULL, "The tree list is embedded in the first chunk");
   // which means that the list can never be empty.
-  assert(!this->verify_chunk_in_free_list(chunk), "Double entry");
+  // This is expensive for metaspace
+  assert(!FLSVerifyDictionary || !this->verify_chunk_in_free_list(chunk), "Double entry");
   assert(head() == NULL || head()->prev() == NULL, "list invariant");
   assert(tail() == NULL || tail()->next() == NULL, "list invariant");
 
@@ -253,7 +254,8 @@
   assert(chunk->list() == this, "list should be set for chunk");
   assert(head() != NULL, "The tree list is embedded in the first chunk");
   assert(chunk != NULL, "returning NULL chunk");
-  assert(!this->verify_chunk_in_free_list(chunk), "Double entry");
+  // This is expensive for metaspace
+  assert(!FLSVerifyDictionary || !this->verify_chunk_in_free_list(chunk), "Double entry");
   assert(head() == NULL || head()->prev() == NULL, "list invariant");
   assert(tail() == NULL || tail()->next() == NULL, "list invariant");
 
--- a/test/hotspot/jtreg/vmTestbase/metaspace/stressDictionary/StressDictionary.java	Thu Nov 29 10:13:42 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/metaspace/stressDictionary/StressDictionary.java	Thu Nov 29 13:04:25 2018 -0500
@@ -29,7 +29,7 @@
  *
  * @library /vmTestbase /test/lib
  * @run driver jdk.test.lib.FileInstaller . .
- * @run main/othervm/timeout=420 -XX:+IgnoreUnrecognizedVMOptions -XX:-CMSPrecleaningEnabled metaspace.stressDictionary.StressDictionary -stressTime 30
+ * @run main/othervm/timeout=420 metaspace.stressDictionary.StressDictionary -stressTime 30
  */
 
 package metaspace.stressDictionary;