src/share/vm/runtime/sweeper.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/sweeper.cpp Wed Apr 13 18:50:23 2011
--- new/src/share/vm/runtime/sweeper.cpp Wed Apr 13 18:50:23 2011
*** 416,445 ****
--- 416,455 ----
// Print out some state information about the current sweep and the
// state of the code cache if it's requested.
void NMethodSweeper::log_sweep(const char* msg, const char* format, ...) {
if (PrintMethodFlushing) {
+ 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);
+
ttyLocker ttyl;
tty->print("### sweeper: %s ", msg);
if (format != NULL) {
va_list ap;
va_start(ap, format);
tty->vprint(format, ap);
va_end(ap);
}
! CodeCache::log_state(tty); tty->cr();
! tty->print_cr(s.as_string());
}
if (LogCompilation && (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);
+
ttyLocker ttyl;
xtty->begin_elem("sweeper state='%s' traversals='" INTX_FORMAT "' ", msg, (intx)traversal_count());
if (format != NULL) {
va_list ap;
va_start(ap, format);
xtty->vprint(format, ap);
va_end(ap);
}
! CodeCache::log_state(xtty);
! xtty->print(s.as_string());
xtty->stamp();
xtty->end_elem();
}
}
src/share/vm/runtime/sweeper.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File