changeset 38219:d4fc04931803

8153527: break_tty_lock_for_safepoint causes "assert(false) failed: bad tag in log" and broken compile log Summary: Retake tty_lock before printing closing tag in print_optoassembly Reviewed-by: kvn
author neliasso
date Fri, 22 Apr 2016 16:05:00 +0200
parents f5ba1dea04eb
children a20cc07facd6
files hotspot/src/share/vm/opto/output.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/opto/output.cpp	Wed Apr 13 14:48:22 2016 +0200
+++ b/hotspot/src/share/vm/opto/output.cpp	Fri Apr 22 16:05:00 2016 +0200
@@ -1548,6 +1548,10 @@
       }
       dump_asm(node_offsets, node_offset_limit);
       if (xtty != NULL) {
+        // print_metadata and dump_asm above may safepoint which makes us loose the ttylock.
+        // Retake lock too make sure the end tag is coherent, and that xmlStream->pop_tag is done
+        // thread safe
+        ttyLocker ttyl2;
         xtty->tail("opto_assembly");
       }
     }