< prev index next >

src/share/vm/runtime/safepoint.hpp

Print this page
rev 13387 : [mq]: parallel_sp_cleaning.patch

*** 49,58 **** --- 49,59 ---- class ThreadSafepointState; class SnippetCache; class nmethod; + class WorkGang; // // Implements roll-forward to safepoint (safepoint synchronization) // class SafepointSynchronize : AllStatic {
*** 88,97 **** --- 89,109 ---- jlong _time_to_do_cleanups; // total time in millis spent in performing cleanups jlong _time_to_sync; // total time in millis spent in getting to _synchronized jlong _time_to_exec_vmop; // total time in millis spent in vm operation itself } SafepointStats; + enum SafepointCleanupTasks { + SAFEPOINT_CLEANUP_DEFLATE_MONITORS, + SAFEPOINT_CLEANUP_UPDATE_INLINE_CACHES, + SAFEPOINT_CLEANUP_COMPILATION_POLICY, + SAFEPOINT_CLEANUP_SYMBOL_TABLE_REHASH, + SAFEPOINT_CLEANUP_STRING_TABLE_REHASH, + SAFEPOINT_CLEANUP_CLD_PURGE, + // Leave this one last. + SAFEPOINT_CLEANUP_NUM_TASKS + }; + private: static volatile SynchronizeState _state; // Threads might read this flag directly, without acquiring the Threads_lock static volatile int _waiting_to_block; // number of threads we are waiting for to block static int _current_jni_active_count; // Counts the number of active critical natives during the safepoint
*** 127,136 **** --- 139,151 ---- } // For debug long safepoint static void print_safepoint_timeout(SafepointTimeoutReason timeout_reason); + // Parallel cleanup + static WorkGang* _cleanup_workers; + public: // Main entry points // Roll all threads forward to safepoint. Must be called by the
*** 171,180 **** --- 186,200 ---- return _end_of_last_safepoint; } static bool is_cleanup_needed(); static void do_cleanup_tasks(); + private: + static void serial_cleanup(); + static void parallel_cleanup(); + + public: // Debugging static void print_state() PRODUCT_RETURN; static void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(1, 2) PRODUCT_RETURN; static void deferred_initialize_stat();
< prev index next >