< prev index next >

src/share/vm/runtime/thread.hpp

Print this page
rev 12854 : [mq]: gcinterface.patch


  58 class ThreadProfiler;
  59 
  60 class JvmtiThreadState;
  61 class JvmtiGetLoadedClassesClosure;
  62 class ThreadStatistics;
  63 class ConcurrentLocksDump;
  64 class ParkEvent;
  65 class Parker;
  66 
  67 class ciEnv;
  68 class CompileThread;
  69 class CompileLog;
  70 class CompileTask;
  71 class CompileQueue;
  72 class CompilerCounters;
  73 class vframeArray;
  74 
  75 class DeoptResourceMark;
  76 class jvmtiDeferredLocalVariableSet;
  77 
  78 class GCTaskQueue;
  79 class ThreadClosure;
  80 class IdealGraphPrinter;
  81 
  82 class Metadata;
  83 template <class T, MEMFLAGS F> class ChunkedList;
  84 typedef ChunkedList<Metadata*, mtInternal> MetadataOnStackBuffer;
  85 
  86 DEBUG_ONLY(class ResourceMark;)
  87 
  88 class WorkerThread;
  89 
  90 // Class hierarchy
  91 // - Thread
  92 //   - NamedThread
  93 //     - VMThread
  94 //     - ConcurrentGCThread
  95 //     - WorkerThread
  96 //       - GangWorker
  97 //       - GCTaskThread
  98 //   - JavaThread


2087   //
2088   // Each thread contains a a "parity" field. A task will claim the
2089   // thread only if its parity field is the same as the global parity,
2090   // which is updated by calling change_thread_claim_parity().
2091   //
2092   // For this to work change_thread_claim_parity() needs to be called
2093   // exactly once in sequential code before starting parallel tasks
2094   // that should claim threads.
2095   //
2096   // New threads get their parity set to 0 and change_thread_claim_parity()
2097   // never set the global parity to 0.
2098   static int thread_claim_parity() { return _thread_claim_parity; }
2099   static void change_thread_claim_parity();
2100   static void assert_all_threads_claimed() NOT_DEBUG_RETURN;
2101 
2102   // Apply "f->do_oop" to all root oops in all threads.
2103   // This version may only be called by sequential code.
2104   static void oops_do(OopClosure* f, CodeBlobClosure* cf);
2105   // This version may be called by sequential or parallel code.
2106   static void possibly_parallel_oops_do(bool is_par, OopClosure* f, CodeBlobClosure* cf);
2107   // This creates a list of GCTasks, one per thread.
2108   static void create_thread_roots_tasks(GCTaskQueue* q);
2109   // This creates a list of GCTasks, one per thread, for marking objects.
2110   static void create_thread_roots_marking_tasks(GCTaskQueue* q);
2111 
2112   // Apply "f->do_oop" to roots in all threads that
2113   // are part of compiled frames
2114   static void compiled_frame_oops_do(OopClosure* f, CodeBlobClosure* cf);
2115 
2116   static void convert_hcode_pointers();
2117   static void restore_hcode_pointers();
2118 
2119   // Sweeper
2120   static void nmethods_do(CodeBlobClosure* cf);
2121 
2122   // RedefineClasses support
2123   static void metadata_do(void f(Metadata*));
2124   static void metadata_handles_do(void f(Metadata*));
2125 
2126 #ifdef ASSERT
2127   static bool is_vm_complete() { return _vm_complete; }
2128 #endif
2129 
2130   // Verification




  58 class ThreadProfiler;
  59 
  60 class JvmtiThreadState;
  61 class JvmtiGetLoadedClassesClosure;
  62 class ThreadStatistics;
  63 class ConcurrentLocksDump;
  64 class ParkEvent;
  65 class Parker;
  66 
  67 class ciEnv;
  68 class CompileThread;
  69 class CompileLog;
  70 class CompileTask;
  71 class CompileQueue;
  72 class CompilerCounters;
  73 class vframeArray;
  74 
  75 class DeoptResourceMark;
  76 class jvmtiDeferredLocalVariableSet;
  77 

  78 class ThreadClosure;
  79 class IdealGraphPrinter;
  80 
  81 class Metadata;
  82 template <class T, MEMFLAGS F> class ChunkedList;
  83 typedef ChunkedList<Metadata*, mtInternal> MetadataOnStackBuffer;
  84 
  85 DEBUG_ONLY(class ResourceMark;)
  86 
  87 class WorkerThread;
  88 
  89 // Class hierarchy
  90 // - Thread
  91 //   - NamedThread
  92 //     - VMThread
  93 //     - ConcurrentGCThread
  94 //     - WorkerThread
  95 //       - GangWorker
  96 //       - GCTaskThread
  97 //   - JavaThread


2086   //
2087   // Each thread contains a a "parity" field. A task will claim the
2088   // thread only if its parity field is the same as the global parity,
2089   // which is updated by calling change_thread_claim_parity().
2090   //
2091   // For this to work change_thread_claim_parity() needs to be called
2092   // exactly once in sequential code before starting parallel tasks
2093   // that should claim threads.
2094   //
2095   // New threads get their parity set to 0 and change_thread_claim_parity()
2096   // never set the global parity to 0.
2097   static int thread_claim_parity() { return _thread_claim_parity; }
2098   static void change_thread_claim_parity();
2099   static void assert_all_threads_claimed() NOT_DEBUG_RETURN;
2100 
2101   // Apply "f->do_oop" to all root oops in all threads.
2102   // This version may only be called by sequential code.
2103   static void oops_do(OopClosure* f, CodeBlobClosure* cf);
2104   // This version may be called by sequential or parallel code.
2105   static void possibly_parallel_oops_do(bool is_par, OopClosure* f, CodeBlobClosure* cf);




2106 
2107   // Apply "f->do_oop" to roots in all threads that
2108   // are part of compiled frames
2109   static void compiled_frame_oops_do(OopClosure* f, CodeBlobClosure* cf);
2110 
2111   static void convert_hcode_pointers();
2112   static void restore_hcode_pointers();
2113 
2114   // Sweeper
2115   static void nmethods_do(CodeBlobClosure* cf);
2116 
2117   // RedefineClasses support
2118   static void metadata_do(void f(Metadata*));
2119   static void metadata_handles_do(void f(Metadata*));
2120 
2121 #ifdef ASSERT
2122   static bool is_vm_complete() { return _vm_complete; }
2123 #endif
2124 
2125   // Verification


< prev index next >