comparison src/share/vm/runtime/thread.hpp @ 7212:291ffc492eb6

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Fri, 14 Dec 2012 14:35:13 +0100
parents 679e6584c177 d0aa87f04bd5
children c6c72de0537e
comparison
equal deleted inserted replaced
7163:2ed8d74e5984 7212:291ffc492eb6
478 _current_waiting_monitor = monitor; 478 _current_waiting_monitor = monitor;
479 } 479 }
480 480
481 // GC support 481 // GC support
482 // Apply "f->do_oop" to all root oops in "this". 482 // Apply "f->do_oop" to all root oops in "this".
483 // Apply "cld_f->do_cld" to CLDs that are otherwise not kept alive.
484 // Used by JavaThread::oops_do.
483 // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames 485 // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames
484 virtual void oops_do(OopClosure* f, CodeBlobClosure* cf); 486 virtual void oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf);
485 487
486 // Handles the parallel case for the method below. 488 // Handles the parallel case for the method below.
487 private: 489 private:
488 bool claim_oops_do_par_case(int collection_parity); 490 bool claim_oops_do_par_case(int collection_parity);
489 public: 491 public:
1451 1453
1452 // Frame iteration; calls the function f for all frames on the stack 1454 // Frame iteration; calls the function f for all frames on the stack
1453 void frames_do(void f(frame*, const RegisterMap*)); 1455 void frames_do(void f(frame*, const RegisterMap*));
1454 1456
1455 // Memory operations 1457 // Memory operations
1456 void oops_do(OopClosure* f, CodeBlobClosure* cf); 1458 void oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf);
1457 1459
1458 // Sweeper operations 1460 // Sweeper operations
1459 void nmethods_do(CodeBlobClosure* cf); 1461 void nmethods_do(CodeBlobClosure* cf);
1460 1462
1461 // RedefineClasses Support 1463 // RedefineClasses Support
1847 1849
1848 bool is_Compiler_thread() const { return true; } 1850 bool is_Compiler_thread() const { return true; }
1849 // Hide this compiler thread from external view. 1851 // Hide this compiler thread from external view.
1850 // (thomaswue) For Graal, the compiler thread should be visible. 1852 // (thomaswue) For Graal, the compiler thread should be visible.
1851 bool is_hidden_from_external_view() const { 1853 bool is_hidden_from_external_view() const {
1852 #ifdef GRAAL 1854 #ifdef GRAALVM
1853 return !DebugGraal; 1855 return !DebugGraal;
1854 #else 1856 #else
1855 return true; 1857 return true;
1856 #endif 1858 #endif
1857 } 1859 }
1876 #endif 1878 #endif
1877 1879
1878 // Get/set the thread's current task 1880 // Get/set the thread's current task
1879 CompileTask* task() { return _task; } 1881 CompileTask* task() { return _task; }
1880 void set_task(CompileTask* task) { _task = task; } 1882 void set_task(CompileTask* task) { _task = task; }
1883
1881 }; 1884 };
1882 1885
1883 inline CompilerThread* CompilerThread::current() { 1886 inline CompilerThread* CompilerThread::current() {
1884 return JavaThread::current()->as_CompilerThread(); 1887 return JavaThread::current()->as_CompilerThread();
1885 } 1888 }
1924 // Garbage collection 1927 // Garbage collection
1925 static void follow_other_roots(void f(oop*)); 1928 static void follow_other_roots(void f(oop*));
1926 1929
1927 // Apply "f->do_oop" to all root oops in all threads. 1930 // Apply "f->do_oop" to all root oops in all threads.
1928 // This version may only be called by sequential code. 1931 // This version may only be called by sequential code.
1929 static void oops_do(OopClosure* f, CodeBlobClosure* cf); 1932 static void oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf);
1930 // This version may be called by sequential or parallel code. 1933 // This version may be called by sequential or parallel code.
1931 static void possibly_parallel_oops_do(OopClosure* f, CodeBlobClosure* cf); 1934 static void possibly_parallel_oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf);
1932 // This creates a list of GCTasks, one per thread. 1935 // This creates a list of GCTasks, one per thread.
1933 static void create_thread_roots_tasks(GCTaskQueue* q); 1936 static void create_thread_roots_tasks(GCTaskQueue* q);
1934 // This creates a list of GCTasks, one per thread, for marking objects. 1937 // This creates a list of GCTasks, one per thread, for marking objects.
1935 static void create_thread_roots_marking_tasks(GCTaskQueue* q); 1938 static void create_thread_roots_marking_tasks(GCTaskQueue* q);
1936 1939