comparison src/share/vm/runtime/thread.hpp @ 1974:fd1d227ef1b9

6983204: G1: Nightly test nsk/regression/b4958615 failing with +ExplicitGCInvokesConcurrent Summary: Enable reference discovery during concurrent marking by setting the reference processor field of the concurrent marking closure. Keep reference objects on the discovered reference lists alive during incremental evacuation pauses until they are processed at the end of concurrent marking. Reviewed-by: ysr, tonyp
author johnc
date Wed, 01 Dec 2010 17:34:02 -0800
parents f95d63e2154a
children 06f017f7daa7 b1a2afa37ec4
comparison
equal deleted inserted replaced
1973:631f79e71e90 1974:fd1d227ef1b9
75 class jvmtiDeferredLocalVariableSet; 75 class jvmtiDeferredLocalVariableSet;
76 76
77 class GCTaskQueue; 77 class GCTaskQueue;
78 class ThreadClosure; 78 class ThreadClosure;
79 class IdealGraphPrinter; 79 class IdealGraphPrinter;
80
81 class WorkerThread;
80 82
81 // Class hierarchy 83 // Class hierarchy
82 // - Thread 84 // - Thread
83 // - NamedThread 85 // - NamedThread
84 // - VMThread 86 // - VMThread
287 // threads. 289 // threads.
288 virtual bool is_GC_task_thread() const { return false; } 290 virtual bool is_GC_task_thread() const { return false; }
289 virtual bool is_Watcher_thread() const { return false; } 291 virtual bool is_Watcher_thread() const { return false; }
290 virtual bool is_ConcurrentGC_thread() const { return false; } 292 virtual bool is_ConcurrentGC_thread() const { return false; }
291 virtual bool is_Named_thread() const { return false; } 293 virtual bool is_Named_thread() const { return false; }
294 virtual bool is_Worker_thread() const { return false; }
295
296 // Casts
297 virtual WorkerThread* as_Worker_thread() const { return NULL; }
292 298
293 virtual char* name() const { return (char*)"Unknown thread"; } 299 virtual char* name() const { return (char*)"Unknown thread"; }
294 300
295 // Returns the current thread 301 // Returns the current thread
296 static inline Thread* current(); 302 static inline Thread* current();
626 // Worker threads are named and have an id of an assigned work. 632 // Worker threads are named and have an id of an assigned work.
627 class WorkerThread: public NamedThread { 633 class WorkerThread: public NamedThread {
628 private: 634 private:
629 uint _id; 635 uint _id;
630 public: 636 public:
631 WorkerThread() : _id(0) { } 637 WorkerThread() : _id(0) { }
632 void set_id(uint work_id) { _id = work_id; } 638 virtual bool is_Worker_thread() const { return true; }
633 uint id() const { return _id; } 639
640 virtual WorkerThread* as_Worker_thread() const {
641 assert(is_Worker_thread(), "Dubious cast to WorkerThread*?");
642 return (WorkerThread*) this;
643 }
644
645 void set_id(uint work_id) { _id = work_id; }
646 uint id() const { return _id; }
634 }; 647 };
635 648
636 // A single WatcherThread is used for simulating timer interrupts. 649 // A single WatcherThread is used for simulating timer interrupts.
637 class WatcherThread: public Thread { 650 class WatcherThread: public Thread {
638 friend class VMStructs; 651 friend class VMStructs;