8076173: VirtualSpaceNode container_count() and container_count_slow() have different return types
authordavid
Tue, 31 Mar 2015 11:34:35 +0200
changeset 29806 64aa40385bdd
parent 29805 398335f2abed
child 29807 c6217428f47f
8076173: VirtualSpaceNode container_count() and container_count_slow() have different return types Reviewed-by: pliden, stefank
hotspot/src/share/vm/memory/metaspace.cpp
--- a/hotspot/src/share/vm/memory/metaspace.cpp	Tue Mar 31 11:29:21 2015 +0200
+++ b/hotspot/src/share/vm/memory/metaspace.cpp	Tue Mar 31 11:34:35 2015 +0200
@@ -344,7 +344,7 @@
   void inc_container_count();
   void dec_container_count();
 #ifdef ASSERT
-  uint container_count_slow();
+  uintx container_count_slow();
   void verify_container_count();
 #endif
 
@@ -461,8 +461,8 @@
 }
 
 #ifdef ASSERT
-uint VirtualSpaceNode::container_count_slow() {
-  uint count = 0;
+uintx VirtualSpaceNode::container_count_slow() {
+  uintx count = 0;
   Metachunk* chunk = first_chunk();
   Metachunk* invalid_chunk = (Metachunk*) top();
   while (chunk < invalid_chunk ) {
@@ -796,10 +796,7 @@
 void VirtualSpaceNode::inc_container_count() {
   assert_lock_strong(SpaceManager::expand_lock());
   _container_count++;
-  assert(_container_count == container_count_slow(),
-         err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT
-                 " container_count_slow() %u",
-                 _container_count, container_count_slow()));
+  DEBUG_ONLY(verify_container_count();)
 }
 
 void VirtualSpaceNode::dec_container_count() {
@@ -810,8 +807,8 @@
 #ifdef ASSERT
 void VirtualSpaceNode::verify_container_count() {
   assert(_container_count == container_count_slow(),
-    err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT
-            " container_count_slow() %u", _container_count, container_count_slow()));
+    err_msg("Inconsistency in container_count _container_count " UINTX_FORMAT
+            " container_count_slow() " UINTX_FORMAT, _container_count, container_count_slow()));
 }
 #endif