< prev index next >

src/share/vm/runtime/thread.hpp

Print this page
rev 8615 : CMSParallelFullGC: Parallel version of CMS Full GC.

*** 77,86 **** --- 77,87 ---- class jvmtiDeferredLocalVariableSet; class GCTaskQueue; class ThreadClosure; class IdealGraphPrinter; + class NamedThread; class Metadata; template <class T, MEMFLAGS F> class ChunkedList; typedef ChunkedList<Metadata*, mtInternal> MetadataOnStackBuffer;
*** 322,331 **** --- 323,333 ---- virtual bool is_jvmti_agent_thread() const { return false; } // True iff the thread can perform GC operations at a safepoint. // Generally will be true only of VM thread and parallel GC WorkGang // threads. virtual bool is_GC_task_thread() const { return false; } + virtual bool is_GangWorker_thread() const { return false; } virtual bool is_Watcher_thread() const { return false; } virtual bool is_ConcurrentGC_thread() const { return false; } virtual bool is_Named_thread() const { return false; } virtual bool is_Worker_thread() const { return false; }
*** 633,642 **** --- 635,649 ---- static void SpinAcquire(volatile int * Lock, const char * Name); static void SpinRelease(volatile int * Lock); static void muxAcquire(volatile intptr_t * Lock, const char * Name); static void muxAcquireW(volatile intptr_t * Lock, ParkEvent * ev); static void muxRelease(volatile intptr_t * Lock); + + NamedThread* as_Named_thread() { + assert(is_Named_thread(), "Must be a NamedThread"); + return (NamedThread*) this; + } }; // Inline implementation of Thread::current() // Thread::current is "hot" it's called > 128K times in the 1st 500 msecs of // startup.
*** 680,689 **** --- 687,719 ---- virtual bool is_Named_thread() const { return true; } virtual char* name() const { return _name == NULL ? (char*)"Unknown Thread" : _name; } JavaThread *processed_thread() { return _processed_thread; } void set_processed_thread(JavaThread *thread) { _processed_thread = thread; } virtual void print_on(outputStream* st) const; + + // Support for CMSParallelFullGC + // Should be OopTaskQueue* but use void* to break the dependency cycle + void* _pms_task_queue; + void* _pms_objarray_task_queue; + // Should be Stack<markOop>* but use void* to break the dependency cycle + void* _pms_preserved_mark_stack; + // Should be Stack<oop>* but use void* to break the dependency cycle + void* _pms_preserved_oop_stack; + size_t _pms_preserved_count; + size_t _pms_preserved_count_max; + // Should be PreservedMark* but use void* to break the dependency cycle + void* _pms_preserved_marks; + + void reset_pms_data() { + _pms_task_queue = NULL; + _pms_objarray_task_queue = NULL; + _pms_preserved_mark_stack = NULL; + _pms_preserved_oop_stack = NULL; + _pms_preserved_count = 0; + _pms_preserved_count_max = 0; + _pms_preserved_marks = NULL; + } }; // Worker threads are named and have an id of an assigned work. class WorkerThread: public NamedThread { private:
< prev index next >