502 503 504 505 // Various cleaning tasks that should be done periodically at safepoints 506 void SafepointSynchronize::do_cleanup_tasks() { 507 { 508 TraceTime t1("deflating idle monitors", TraceSafepointCleanupTime); 509 ObjectSynchronizer::deflate_idle_monitors(); 510 } 511 512 { 513 TraceTime t2("updating inline caches", TraceSafepointCleanupTime); 514 InlineCacheBuffer::update_inline_caches(); 515 } 516 { 517 TraceTime t3("compilation policy safepoint handler", TraceSafepointCleanupTime); 518 CompilationPolicy::policy()->do_safepoint_work(); 519 } 520 521 { 522 TraceTime t4("sweeping nmethods", TraceSafepointCleanupTime); 523 NMethodSweeper::scan_stacks(); 524 } 525 526 if (SymbolTable::needs_rehashing()) { 527 TraceTime t5("rehashing symbol table", TraceSafepointCleanupTime); 528 SymbolTable::rehash_table(); 529 } 530 531 if (StringTable::needs_rehashing()) { 532 TraceTime t6("rehashing string table", TraceSafepointCleanupTime); 533 StringTable::rehash_table(); 534 } 535 536 // rotate log files? 537 if (UseGCLogFileRotation) { 538 gclog_or_tty->rotate_log(); 539 } 540 541 if (MemTracker::is_on()) { 542 MemTracker::sync(); 543 } | 502 503 504 505 // Various cleaning tasks that should be done periodically at safepoints 506 void SafepointSynchronize::do_cleanup_tasks() { 507 { 508 TraceTime t1("deflating idle monitors", TraceSafepointCleanupTime); 509 ObjectSynchronizer::deflate_idle_monitors(); 510 } 511 512 { 513 TraceTime t2("updating inline caches", TraceSafepointCleanupTime); 514 InlineCacheBuffer::update_inline_caches(); 515 } 516 { 517 TraceTime t3("compilation policy safepoint handler", TraceSafepointCleanupTime); 518 CompilationPolicy::policy()->do_safepoint_work(); 519 } 520 521 { 522 TraceTime t4("mark nmethods", TraceSafepointCleanupTime); 523 NMethodSweeper::mark_active_nmethods(); 524 } 525 526 if (SymbolTable::needs_rehashing()) { 527 TraceTime t5("rehashing symbol table", TraceSafepointCleanupTime); 528 SymbolTable::rehash_table(); 529 } 530 531 if (StringTable::needs_rehashing()) { 532 TraceTime t6("rehashing string table", TraceSafepointCleanupTime); 533 StringTable::rehash_table(); 534 } 535 536 // rotate log files? 537 if (UseGCLogFileRotation) { 538 gclog_or_tty->rotate_log(); 539 } 540 541 if (MemTracker::is_on()) { 542 MemTracker::sync(); 543 } |