src/share/vm/compiler/compileBroker.cpp

changeset 2764
dbccacb79c63
parent 2729
e863062e521d
child 2826
86ebb26bcdeb
     1.1 --- a/src/share/vm/compiler/compileBroker.cpp	Wed Apr 13 14:33:03 2011 -0700
     1.2 +++ b/src/share/vm/compiler/compileBroker.cpp	Thu Apr 14 00:02:21 2011 -0700
     1.3 @@ -1736,8 +1736,14 @@
     1.4    UseInterpreter = true;
     1.5    if (UseCompiler || AlwaysCompileLoopMethods ) {
     1.6      if (xtty != NULL) {
     1.7 +      stringStream s;
     1.8 +      // Dump code cache state into a buffer before locking the tty,
     1.9 +      // because log_state() will use locks causing lock conflicts.
    1.10 +      CodeCache::log_state(&s);
    1.11 +      // Lock to prevent tearing
    1.12 +      ttyLocker ttyl;
    1.13        xtty->begin_elem("code_cache_full");
    1.14 -      CodeCache::log_state(xtty);
    1.15 +      xtty->print(s.as_string());
    1.16        xtty->stamp();
    1.17        xtty->end_elem();
    1.18      }

mercurial