From c93a43fcfedb0104482c1582173e92583ac63991 Mon Sep 17 00:00:00 2001
From: Thomas Stuefe <stuefe@openjdk.org>
Date: Thu, 29 Jun 2017 12:35:30 +0200
Subject: [PATCH] 8183228: Fix optimized build after JDK-8170933

Reviewed-by: mgerdin, coleenp
---
 hotspot/src/share/vm/memory/metaspace.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hotspot/src/share/vm/memory/metaspace.cpp b/hotspot/src/share/vm/memory/metaspace.cpp
index f7a02653655..7f5d7f928d6 100644
--- a/hotspot/src/share/vm/memory/metaspace.cpp
+++ b/hotspot/src/share/vm/memory/metaspace.cpp
@@ -4106,6 +4106,10 @@ void ChunkManager_test_list_index() {
   }
 }
 
+#endif // !PRODUCT
+
+#ifdef ASSERT
+
 // ChunkManagerReturnTest stresses taking/returning chunks from the ChunkManager. It takes and
 // returns chunks from/to the ChunkManager while keeping track of the expected ChunkManager
 // content.
@@ -4415,4 +4419,4 @@ void SpaceManager_test_adjust_initial_chunk_size() {
   SpaceManagerTest::test_adjust_initial_chunk_size();
 }
 
-#endif
+#endif // ASSERT