hotspot/src/share/vm/utilities/hashtable.cpp
changeset 39982 1a3808e3f4d9
parent 38733 2b65f4db449e
child 42073 89e056fd82cc
--- a/hotspot/src/share/vm/utilities/hashtable.cpp	Tue Jul 19 09:30:30 2016 +0200
+++ b/hotspot/src/share/vm/utilities/hashtable.cpp	Tue Jul 19 11:00:45 2016 -0500
@@ -342,13 +342,18 @@
 
 #ifdef ASSERT
 
-template <MEMFLAGS F> void BasicHashtable<F>::verify_lookup_length(double load) {
-  if ((double)_lookup_length / (double)_lookup_count > load * 2.0) {
+template <MEMFLAGS F> bool BasicHashtable<F>::verify_lookup_length(double load) {
+  if ((!_lookup_warning) && (_lookup_count != 0)
+      && ((double)_lookup_length / (double)_lookup_count > load * 2.0)) {
     warning("Performance bug: SystemDictionary lookup_count=%d "
             "lookup_length=%d average=%lf load=%f",
             _lookup_count, _lookup_length,
-            (double) _lookup_length / _lookup_count, load);
+            (double)_lookup_length / _lookup_count, load);
+    _lookup_warning = true;
+
+    return false;
   }
+  return true;
 }
 
 #endif