src/hotspot/share/runtime/safepoint.cpp
changeset 54961 30c8a21ce002
parent 54942 2523496f5107
child 54982 b18c8301b8c2
equal deleted inserted replaced
54960:e46fe26d7f77 54961:30c8a21ce002
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "classfile/classLoaderDataGraph.inline.hpp"
    26 #include "classfile/classLoaderDataGraph.inline.hpp"
       
    27 #include "classfile/dictionary.hpp"
    27 #include "classfile/stringTable.hpp"
    28 #include "classfile/stringTable.hpp"
    28 #include "classfile/symbolTable.hpp"
    29 #include "classfile/symbolTable.hpp"
    29 #include "classfile/systemDictionary.hpp"
    30 #include "classfile/systemDictionary.hpp"
    30 #include "code/codeCache.hpp"
    31 #include "code/codeCache.hpp"
    31 #include "code/icBuffer.hpp"
    32 #include "code/icBuffer.hpp"
   608         post_safepoint_cleanup_task_event(event, safepoint_id, name);
   609         post_safepoint_cleanup_task_event(event, safepoint_id, name);
   609       }
   610       }
   610     }
   611     }
   611 
   612 
   612     if (_subtasks.try_claim_task(SafepointSynchronize::SAFEPOINT_CLEANUP_CLD_PURGE)) {
   613     if (_subtasks.try_claim_task(SafepointSynchronize::SAFEPOINT_CLEANUP_CLD_PURGE)) {
   613       // CMS delays purging the CLDG until the beginning of the next safepoint and to
   614       if (ClassLoaderDataGraph::should_purge_and_reset()) {
   614       // make sure concurrent sweep is done
   615         // CMS delays purging the CLDG until the beginning of the next safepoint and to
   615       const char* name = "purging class loader data graph";
   616         // make sure concurrent sweep is done
   616       EventSafepointCleanupTask event;
   617         const char* name = "purging class loader data graph";
   617       TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
   618         EventSafepointCleanupTask event;
   618       ClassLoaderDataGraph::purge_if_needed();
   619         TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
   619 
   620         ClassLoaderDataGraph::purge();
   620       post_safepoint_cleanup_task_event(event, safepoint_id, name);
   621 
       
   622         post_safepoint_cleanup_task_event(event, safepoint_id, name);
       
   623       }
   621     }
   624     }
   622 
   625 
   623     if (_subtasks.try_claim_task(SafepointSynchronize::SAFEPOINT_CLEANUP_SYSTEM_DICTIONARY_RESIZE)) {
   626     if (_subtasks.try_claim_task(SafepointSynchronize::SAFEPOINT_CLEANUP_SYSTEM_DICTIONARY_RESIZE)) {
   624       const char* name = "resizing system dictionaries";
   627       if (Dictionary::does_any_dictionary_needs_resizing()) {
   625       EventSafepointCleanupTask event;
   628         const char* name = "resizing system dictionaries";
   626       TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
   629         EventSafepointCleanupTask event;
   627       ClassLoaderDataGraph::resize_if_needed();
   630         TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
   628 
   631         ClassLoaderDataGraph::resize_dictionaries();
   629       post_safepoint_cleanup_task_event(event, safepoint_id, name);
   632 
       
   633         post_safepoint_cleanup_task_event(event, safepoint_id, name);
       
   634       }
   630     }
   635     }
   631 
   636 
   632     _subtasks.all_tasks_completed(_num_workers);
   637     _subtasks.all_tasks_completed(_num_workers);
   633   }
   638   }
   634 };
   639 };