Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.hpp @ 4095:bca17e38de00
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
Summary: Select number of GC threads dynamically based on heap usage and number of Java threads
Reviewed-by: johnc, ysr, jcoomes
author | jmasa |
---|---|
date | Tue, 09 Aug 2011 10:16:01 -0700 |
parents | f95d63e2154a |
children | d2a62e0f25eb |
comparison
equal
deleted
inserted
replaced
4094:3a298e04d914 | 4095:bca17e38de00 |
---|---|
33 | 33 |
34 // Declarations of classes referenced in this file via pointer. | 34 // Declarations of classes referenced in this file via pointer. |
35 class GCTaskManager; | 35 class GCTaskManager; |
36 | 36 |
37 class GCTaskThread : public WorkerThread { | 37 class GCTaskThread : public WorkerThread { |
38 friend class GCTaskManager; | |
38 private: | 39 private: |
39 // Instance state. | 40 // Instance state. |
40 GCTaskManager* _manager; // Manager for worker. | 41 GCTaskManager* _manager; // Manager for worker. |
41 const uint _processor_id; // Which processor the worker is on. | 42 const uint _processor_id; // Which processor the worker is on. |
42 | 43 |
43 GCTaskTimeStamp* _time_stamps; | 44 GCTaskTimeStamp* _time_stamps; |
44 uint _time_stamp_index; | 45 uint _time_stamp_index; |
45 | 46 |
46 GCTaskTimeStamp* time_stamp_at(uint index); | 47 GCTaskTimeStamp* time_stamp_at(uint index); |
48 | |
49 bool _is_working; // True if participating in GC tasks | |
47 | 50 |
48 public: | 51 public: |
49 // Factory create and destroy methods. | 52 // Factory create and destroy methods. |
50 static GCTaskThread* create(GCTaskManager* manager, | 53 static GCTaskThread* create(GCTaskManager* manager, |
51 uint which, | 54 uint which, |
82 return id(); | 85 return id(); |
83 } | 86 } |
84 uint processor_id() const { | 87 uint processor_id() const { |
85 return _processor_id; | 88 return _processor_id; |
86 } | 89 } |
90 void set_is_working(bool v) { _is_working = v; } | |
87 }; | 91 }; |
88 | 92 |
89 class GCTaskTimeStamp : public CHeapObj | 93 class GCTaskTimeStamp : public CHeapObj |
90 { | 94 { |
91 private: | 95 private: |