< prev index next >

src/hotspot/share/runtime/sweeper.cpp

Print this page
rev 49285 : [mq]: 8198691.patch


 807     ResourceMark rm;
 808     stringStream s;
 809     // Dump code cache state into a buffer before locking the tty,
 810     // because log_state() will use locks causing lock conflicts.
 811     CodeCache::log_state(&s);
 812 
 813     ttyLocker ttyl;
 814     xtty->begin_elem("sweeper state='%s' traversals='" INTX_FORMAT "' ", msg, (intx)traversal_count());
 815     if (format != NULL) {
 816       va_list ap;
 817       va_start(ap, format);
 818       xtty->vprint(format, ap);
 819       va_end(ap);
 820     }
 821     xtty->print("%s", s.as_string());
 822     xtty->stamp();
 823     xtty->end_elem();
 824   }
 825 }
 826 
 827 void NMethodSweeper::print() {
 828   ttyLocker ttyl;
 829   tty->print_cr("Code cache sweeper statistics:");
 830   tty->print_cr("  Total sweep time:                %1.0lfms", (double)_total_time_sweeping.value()/1000000);
 831   tty->print_cr("  Total number of full sweeps:     %ld", _total_nof_code_cache_sweeps);
 832   tty->print_cr("  Total number of flushed methods: %ld(%ld C2 methods)", _total_nof_methods_reclaimed,
 833                                                     _total_nof_c2_methods_reclaimed);
 834   tty->print_cr("  Total size of flushed methods:   " SIZE_FORMAT "kB", _total_flushed_size/K);
 835 }


 807     ResourceMark rm;
 808     stringStream s;
 809     // Dump code cache state into a buffer before locking the tty,
 810     // because log_state() will use locks causing lock conflicts.
 811     CodeCache::log_state(&s);
 812 
 813     ttyLocker ttyl;
 814     xtty->begin_elem("sweeper state='%s' traversals='" INTX_FORMAT "' ", msg, (intx)traversal_count());
 815     if (format != NULL) {
 816       va_list ap;
 817       va_start(ap, format);
 818       xtty->vprint(format, ap);
 819       va_end(ap);
 820     }
 821     xtty->print("%s", s.as_string());
 822     xtty->stamp();
 823     xtty->end_elem();
 824   }
 825 }
 826 
 827 void NMethodSweeper::print(outputStream* out) {
 828   out = (out == NULL) ? tty : out;
 829   out->print_cr("Code cache sweeper statistics:");
 830   out->print_cr("  Total sweep time:                %1.0lf ms", (double)_total_time_sweeping.value()/1000000);
 831   out->print_cr("  Total number of full sweeps:     %ld", _total_nof_code_cache_sweeps);
 832   out->print_cr("  Total number of flushed methods: %ld (thereof %ld C2 methods)", _total_nof_methods_reclaimed,
 833                                                     _total_nof_c2_methods_reclaimed);
 834   out->print_cr("  Total size of flushed methods:   " SIZE_FORMAT " kB", _total_flushed_size/K);
 835 }
< prev index next >