Merge
authorgziemski
Mon, 07 Mar 2016 19:29:47 +0000
changeset 36584 ec64a581096f
parent 36582 ad9ee98daf2c (current diff)
parent 36583 71f4f42b0fcd (diff)
child 36587 cc1125d38d21
Merge
--- a/hotspot/src/share/vm/runtime/globals.hpp	Mon Mar 07 19:17:35 2016 +0100
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Mon Mar 07 19:29:47 2016 +0000
@@ -891,9 +891,6 @@
   notproduct(bool, VerifyLastFrame, false,                                  \
           "Verify oops on last frame on entry to VM")                       \
                                                                             \
-  develop(bool, TraceHandleAllocation, false,                               \
-          "Print out warnings when suspiciously many handles are allocated")\
-                                                                            \
   product(bool, FailOverToOldVerifier, true,                                \
           "Fail over to old verifier when split verifier fails")            \
                                                                             \
@@ -3024,14 +3021,6 @@
   notproduct(ccstrlist, SuppressErrorAt, "",                                \
           "List of assertions (file:line) to muzzle")                       \
                                                                             \
-  notproduct(size_t, HandleAllocationLimit, 1024,                           \
-          "Threshold for HandleMark allocation when +TraceHandleAllocation "\
-          "is used")                                                        \
-                                                                            \
-  develop(size_t, TotalHandleAllocationLimit, 1024,                         \
-          "Threshold for total handle allocation when "                     \
-          "+TraceHandleAllocation is used")                                 \
-                                                                            \
   develop(intx, StackPrintLimit, 100,                                       \
           "number of stack frames to print in VM-level stack dump")         \
                                                                             \
--- a/hotspot/src/share/vm/runtime/handles.cpp	Mon Mar 07 19:17:35 2016 +0100
+++ b/hotspot/src/share/vm/runtime/handles.cpp	Mon Mar 07 19:29:47 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -129,14 +129,6 @@
     k = k->next();
   }
 
-  // The thread local handle areas should not get very large
-  if (TraceHandleAllocation && (size_t)handles_visited > TotalHandleAllocationLimit) {
-#ifdef ASSERT
-    warning("%d: Visited in HandleMark : " SIZE_FORMAT, _nof_handlemarks, handles_visited);
-#else
-    warning("Visited in HandleMark : " SIZE_FORMAT, handles_visited);
-#endif
-  }
   if (_prev != NULL) _prev->oops_do(f);
 }
 
@@ -165,31 +157,6 @@
   assert(area->_handle_mark_nesting > 0, "must stack allocate HandleMarks" );
   debug_only(area->_handle_mark_nesting--);
 
-  // Debug code to trace the number of handles allocated per mark/
-#ifdef ASSERT
-  if (TraceHandleAllocation) {
-    size_t handles = 0;
-    Chunk *c = _chunk->next();
-    if (c == NULL) {
-      handles = area->_hwm - _hwm; // no new chunk allocated
-    } else {
-      handles = _max - _hwm;      // add rest in first chunk
-      while(c != NULL) {
-        handles += c->length();
-        c = c->next();
-      }
-      handles -= area->_max - area->_hwm; // adjust for last trunk not full
-    }
-    handles /= sizeof(void *); // Adjust for size of a handle
-    if (handles > HandleAllocationLimit) {
-      // Note: _nof_handlemarks is only set in debug mode
-      warning("%d: Allocated in HandleMark : " SIZE_FORMAT, _nof_handlemarks, handles);
-    }
-
-    tty->print_cr("Handles " SIZE_FORMAT, handles);
-  }
-#endif
-
   // Delete later chunks
   if( _chunk->next() ) {
     // reset arena size before delete chunks. Otherwise, the total