< prev index next >

src/hotspot/share/runtime/sweeper.cpp

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


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


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