hotspot/src/share/vm/runtime/safepoint.cpp
changeset 37161 e881f320966e
parent 37135 73aaaf3cb672
child 37176 663bdc7d0b86
equal deleted inserted replaced
37157:2a0fdb3e2a19 37161:e881f320966e
    42 #include "runtime/atomic.inline.hpp"
    42 #include "runtime/atomic.inline.hpp"
    43 #include "runtime/compilationPolicy.hpp"
    43 #include "runtime/compilationPolicy.hpp"
    44 #include "runtime/deoptimization.hpp"
    44 #include "runtime/deoptimization.hpp"
    45 #include "runtime/frame.inline.hpp"
    45 #include "runtime/frame.inline.hpp"
    46 #include "runtime/interfaceSupport.hpp"
    46 #include "runtime/interfaceSupport.hpp"
    47 #include "runtime/logTimer.hpp"
       
    48 #include "runtime/mutexLocker.hpp"
    47 #include "runtime/mutexLocker.hpp"
    49 #include "runtime/orderAccess.inline.hpp"
    48 #include "runtime/orderAccess.inline.hpp"
    50 #include "runtime/osThread.hpp"
    49 #include "runtime/osThread.hpp"
    51 #include "runtime/safepoint.hpp"
    50 #include "runtime/safepoint.hpp"
    52 #include "runtime/signature.hpp"
    51 #include "runtime/signature.hpp"
    53 #include "runtime/stubCodeGenerator.hpp"
    52 #include "runtime/stubCodeGenerator.hpp"
    54 #include "runtime/stubRoutines.hpp"
    53 #include "runtime/stubRoutines.hpp"
    55 #include "runtime/sweeper.hpp"
    54 #include "runtime/sweeper.hpp"
    56 #include "runtime/synchronizer.hpp"
    55 #include "runtime/synchronizer.hpp"
    57 #include "runtime/thread.inline.hpp"
    56 #include "runtime/thread.inline.hpp"
       
    57 #include "runtime/timerTrace.hpp"
    58 #include "services/runtimeService.hpp"
    58 #include "services/runtimeService.hpp"
    59 #include "utilities/events.hpp"
    59 #include "utilities/events.hpp"
    60 #include "utilities/macros.hpp"
    60 #include "utilities/macros.hpp"
    61 #if INCLUDE_ALL_GCS
    61 #if INCLUDE_ALL_GCS
    62 #include "gc/cms/concurrentMarkSweepThread.hpp"
    62 #include "gc/cms/concurrentMarkSweepThread.hpp"
   486 
   486 
   487 
   487 
   488 // Various cleaning tasks that should be done periodically at safepoints
   488 // Various cleaning tasks that should be done periodically at safepoints
   489 void SafepointSynchronize::do_cleanup_tasks() {
   489 void SafepointSynchronize::do_cleanup_tasks() {
   490   {
   490   {
   491     TraceSafepointTime t1("deflating idle monitors");
   491     TraceTime timer("deflating idle monitors", TRACETIME_LOG(Info, safepointcleanup));
   492     ObjectSynchronizer::deflate_idle_monitors();
   492     ObjectSynchronizer::deflate_idle_monitors();
   493   }
   493   }
   494 
   494 
   495   {
   495   {
   496     TraceSafepointTime t2("updating inline caches");
   496     TraceTime timer("updating inline caches", TRACETIME_LOG(Info, safepointcleanup));
   497     InlineCacheBuffer::update_inline_caches();
   497     InlineCacheBuffer::update_inline_caches();
   498   }
   498   }
   499   {
   499   {
   500     TraceSafepointTime t3("compilation policy safepoint handler");
   500     TraceTime timer("compilation policy safepoint handler", TRACETIME_LOG(Info, safepointcleanup));
   501     CompilationPolicy::policy()->do_safepoint_work();
   501     CompilationPolicy::policy()->do_safepoint_work();
   502   }
   502   }
   503 
   503 
   504   {
   504   {
   505     TraceSafepointTime t4("mark nmethods");
   505     TraceTime timer("mark nmethods", TRACETIME_LOG(Info, safepointcleanup));
   506     NMethodSweeper::mark_active_nmethods();
   506     NMethodSweeper::mark_active_nmethods();
   507   }
   507   }
   508 
   508 
   509   if (SymbolTable::needs_rehashing()) {
   509   if (SymbolTable::needs_rehashing()) {
   510     TraceSafepointTime t5("rehashing symbol table");
   510     TraceTime timer("rehashing symbol table", TRACETIME_LOG(Info, safepointcleanup));
   511     SymbolTable::rehash_table();
   511     SymbolTable::rehash_table();
   512   }
   512   }
   513 
   513 
   514   if (StringTable::needs_rehashing()) {
   514   if (StringTable::needs_rehashing()) {
   515     TraceSafepointTime t6("rehashing string table");
   515     TraceTime timer("rehashing string table", TRACETIME_LOG(Info, safepointcleanup));
   516     StringTable::rehash_table();
   516     StringTable::rehash_table();
   517   }
   517   }
   518 
   518 
   519   {
   519   {
   520     // CMS delays purging the CLDG until the beginning of the next safepoint and to
   520     // CMS delays purging the CLDG until the beginning of the next safepoint and to
   521     // make sure concurrent sweep is done
   521     // make sure concurrent sweep is done
   522     TraceSafepointTime t7("purging class loader data graph");
   522     TraceTime timer("purging class loader data graph", TRACETIME_LOG(Info, safepointcleanup));
   523     ClassLoaderDataGraph::purge_if_needed();
   523     ClassLoaderDataGraph::purge_if_needed();
   524   }
   524   }
   525 }
   525 }
   526 
   526 
   527 
   527