< prev index next >

src/share/vm/runtime/thread.hpp

Print this page




1869   // thread to the thread list before allocating its thread object
1870   static void add(JavaThread* p, bool force_daemon = false);
1871   static void remove(JavaThread* p);
1872   static bool includes(JavaThread* p);
1873   static JavaThread* first()                     { return _thread_list; }
1874   static void threads_do(ThreadClosure* tc);
1875 
1876   // Initializes the vm and creates the vm thread
1877   static jint create_vm(JavaVMInitArgs* args, bool* canTryAgain);
1878   static void convert_vm_init_libraries_to_agents();
1879   static void create_vm_init_libraries();
1880   static void create_vm_init_agents();
1881   static void shutdown_vm_agents();
1882   static bool destroy_vm();
1883   // Supported VM versions via JNI
1884   // Includes JNI_VERSION_1_1
1885   static jboolean is_supported_jni_version_including_1_1(jint version);
1886   // Does not include JNI_VERSION_1_1
1887   static jboolean is_supported_jni_version(jint version);
1888 













1889   static int thread_claim_parity() { return _thread_claim_parity; }
1890   static void change_thread_claim_parity();
1891 
1892   static void assert_all_threads_claimed() PRODUCT_RETURN;

1893   // Apply "f->do_oop" to all root oops in all threads.
1894   // This version may only be called by sequential code.
1895   static void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
1896   // This version may be called by sequential or parallel code.
1897   static void possibly_parallel_oops_do(bool is_par, OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
1898   // This creates a list of GCTasks, one per thread.
1899   static void create_thread_roots_tasks(GCTaskQueue* q);
1900   // This creates a list of GCTasks, one per thread, for marking objects.
1901   static void create_thread_roots_marking_tasks(GCTaskQueue* q);
1902 
1903   // Apply "f->do_oop" to roots in all threads that
1904   // are part of compiled frames
1905   static void compiled_frame_oops_do(OopClosure* f, CodeBlobClosure* cf);
1906 
1907   static void convert_hcode_pointers();
1908   static void restore_hcode_pointers();
1909 
1910   // Sweeper
1911   static void nmethods_do(CodeBlobClosure* cf);
1912 




1869   // thread to the thread list before allocating its thread object
1870   static void add(JavaThread* p, bool force_daemon = false);
1871   static void remove(JavaThread* p);
1872   static bool includes(JavaThread* p);
1873   static JavaThread* first()                     { return _thread_list; }
1874   static void threads_do(ThreadClosure* tc);
1875 
1876   // Initializes the vm and creates the vm thread
1877   static jint create_vm(JavaVMInitArgs* args, bool* canTryAgain);
1878   static void convert_vm_init_libraries_to_agents();
1879   static void create_vm_init_libraries();
1880   static void create_vm_init_agents();
1881   static void shutdown_vm_agents();
1882   static bool destroy_vm();
1883   // Supported VM versions via JNI
1884   // Includes JNI_VERSION_1_1
1885   static jboolean is_supported_jni_version_including_1_1(jint version);
1886   // Does not include JNI_VERSION_1_1
1887   static jboolean is_supported_jni_version(jint version);
1888 
1889   // The "thread claim parity" provides a way for threads to be claimed
1890   // by parallel worker tasks.
1891   //
1892   // Each thread contains a a "parity" field. A task will claim the
1893   // thread only if its parity field is the same as the global parity,
1894   // which is updated by calling change_thread_claim_parity().
1895   //
1896   // For this to work change_thread_claim_parity() needs to be called
1897   // exactly once in sequential code before starting parallel tasks
1898   // that should claim threads.
1899   //
1900   // New threads get their parity set to 0 and change_thread_claim_parity()
1901   // never set the global parity to 0.
1902   static int thread_claim_parity() { return _thread_claim_parity; }
1903   static void change_thread_claim_parity();

1904   static void assert_all_threads_claimed() PRODUCT_RETURN;
1905 
1906   // Apply "f->do_oop" to all root oops in all threads.
1907   // This version may only be called by sequential code.
1908   static void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
1909   // This version may be called by sequential or parallel code.
1910   static void possibly_parallel_oops_do(bool is_par, OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
1911   // This creates a list of GCTasks, one per thread.
1912   static void create_thread_roots_tasks(GCTaskQueue* q);
1913   // This creates a list of GCTasks, one per thread, for marking objects.
1914   static void create_thread_roots_marking_tasks(GCTaskQueue* q);
1915 
1916   // Apply "f->do_oop" to roots in all threads that
1917   // are part of compiled frames
1918   static void compiled_frame_oops_do(OopClosure* f, CodeBlobClosure* cf);
1919 
1920   static void convert_hcode_pointers();
1921   static void restore_hcode_pointers();
1922 
1923   // Sweeper
1924   static void nmethods_do(CodeBlobClosure* cf);
1925 


< prev index next >