Mercurial > hg > truffle
diff src/share/vm/compiler/compileBroker.cpp @ 2482:dbccacb79c63
7036236: VM crashes assert((!inside_attrs()) || is_error_reported()) failed ...
Summary: Eliminate the race condition.
Reviewed-by: kvn
author | iveresov |
---|---|
date | Thu, 14 Apr 2011 00:02:21 -0700 |
parents | e863062e521d |
children | 0654ee04b214 86ebb26bcdeb |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Wed Apr 13 14:33:03 2011 -0700 +++ b/src/share/vm/compiler/compileBroker.cpp Thu Apr 14 00:02:21 2011 -0700 @@ -1736,8 +1736,14 @@ UseInterpreter = true; if (UseCompiler || AlwaysCompileLoopMethods ) { if (xtty != NULL) { + stringStream s; + // Dump code cache state into a buffer before locking the tty, + // because log_state() will use locks causing lock conflicts. + CodeCache::log_state(&s); + // Lock to prevent tearing + ttyLocker ttyl; xtty->begin_elem("code_cache_full"); - CodeCache::log_state(xtty); + xtty->print(s.as_string()); xtty->stamp(); xtty->end_elem(); }