hotspot/src/share/vm/runtime/java.cpp
changeset 46369 3bf4544bec14
parent 44326 6c59cca7ff07
parent 46293 9a88f7fe04b5
child 46380 4a51438196cf
--- a/hotspot/src/share/vm/runtime/java.cpp	Thu Apr 06 04:50:34 2017 +0000
+++ b/hotspot/src/share/vm/runtime/java.cpp	Thu Apr 06 22:58:55 2017 +0200
@@ -99,9 +99,6 @@
 
 void collect_profiled_methods(Method* m) {
   Thread* thread = Thread::current();
-  // This HandleMark prevents a huge amount of handles from being added
-  // to the metadata_handles() array on the thread.
-  HandleMark hm(thread);
   methodHandle mh(thread, m);
   if ((m->method_data() != NULL) &&
       (PrintMethodData || CompilerOracle::should_print(mh))) {
@@ -729,6 +726,8 @@
     index += rc;
     if (_security > 0) {
       rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _security);
+      if (rc == -1) return;
+      index += rc;
     }
     if (_patch > 0) {
       rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _patch);