< prev index next >

src/share/vm/runtime/thread.hpp

Print this page
rev 13265 : 8180932: Parallelize safepoint cleanup
Summary: Provide infrastructure to do safepoint cleanup tasks using parallel worker threads
Reviewed-by: dholmes, rehn, dcubed, thartmann


2046   static JavaThread* _thread_list;
2047   static int         _number_of_threads;
2048   static int         _number_of_non_daemon_threads;
2049   static int         _return_code;
2050   static int         _thread_claim_parity;
2051 #ifdef ASSERT
2052   static bool        _vm_complete;
2053 #endif
2054 
2055   static void initialize_java_lang_classes(JavaThread* main_thread, TRAPS);
2056   static void initialize_jsr292_core_classes(TRAPS);
2057  public:
2058   // Thread management
2059   // force_daemon is a concession to JNI, where we may need to add a
2060   // thread to the thread list before allocating its thread object
2061   static void add(JavaThread* p, bool force_daemon = false);
2062   static void remove(JavaThread* p);
2063   static bool includes(JavaThread* p);
2064   static JavaThread* first()                     { return _thread_list; }
2065   static void threads_do(ThreadClosure* tc);

2066 
2067   // Initializes the vm and creates the vm thread
2068   static jint create_vm(JavaVMInitArgs* args, bool* canTryAgain);
2069   static void convert_vm_init_libraries_to_agents();
2070   static void create_vm_init_libraries();
2071   static void create_vm_init_agents();
2072   static void shutdown_vm_agents();
2073   static bool destroy_vm();
2074   // Supported VM versions via JNI
2075   // Includes JNI_VERSION_1_1
2076   static jboolean is_supported_jni_version_including_1_1(jint version);
2077   // Does not include JNI_VERSION_1_1
2078   static jboolean is_supported_jni_version(jint version);
2079 
2080   // The "thread claim parity" provides a way for threads to be claimed
2081   // by parallel worker tasks.
2082   //
2083   // Each thread contains a a "parity" field. A task will claim the
2084   // thread only if its parity field is the same as the global parity,
2085   // which is updated by calling change_thread_claim_parity().




2046   static JavaThread* _thread_list;
2047   static int         _number_of_threads;
2048   static int         _number_of_non_daemon_threads;
2049   static int         _return_code;
2050   static int         _thread_claim_parity;
2051 #ifdef ASSERT
2052   static bool        _vm_complete;
2053 #endif
2054 
2055   static void initialize_java_lang_classes(JavaThread* main_thread, TRAPS);
2056   static void initialize_jsr292_core_classes(TRAPS);
2057  public:
2058   // Thread management
2059   // force_daemon is a concession to JNI, where we may need to add a
2060   // thread to the thread list before allocating its thread object
2061   static void add(JavaThread* p, bool force_daemon = false);
2062   static void remove(JavaThread* p);
2063   static bool includes(JavaThread* p);
2064   static JavaThread* first()                     { return _thread_list; }
2065   static void threads_do(ThreadClosure* tc);
2066   static void parallel_java_threads_do(ThreadClosure* tc);
2067 
2068   // Initializes the vm and creates the vm thread
2069   static jint create_vm(JavaVMInitArgs* args, bool* canTryAgain);
2070   static void convert_vm_init_libraries_to_agents();
2071   static void create_vm_init_libraries();
2072   static void create_vm_init_agents();
2073   static void shutdown_vm_agents();
2074   static bool destroy_vm();
2075   // Supported VM versions via JNI
2076   // Includes JNI_VERSION_1_1
2077   static jboolean is_supported_jni_version_including_1_1(jint version);
2078   // Does not include JNI_VERSION_1_1
2079   static jboolean is_supported_jni_version(jint version);
2080 
2081   // The "thread claim parity" provides a way for threads to be claimed
2082   // by parallel worker tasks.
2083   //
2084   // Each thread contains a a "parity" field. A task will claim the
2085   // thread only if its parity field is the same as the global parity,
2086   // which is updated by calling change_thread_claim_parity().


< prev index next >