23 */
24
25 #ifndef SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP
26 #define SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP
27
28 #include "gc/shared/concurrentGCThread.hpp"
29
30 // The Concurrent Mark GC Thread (could be several in the future).
31 // This is copied from the Concurrent Mark Sweep GC Thread
32 // Still under construction.
33
34 class ConcurrentMark;
35
36 class ConcurrentMarkThread: public ConcurrentGCThread {
37 friend class VMStructs;
38
39 double _vtime_start; // Initial virtual time.
40 double _vtime_accum; // Accumulated virtual time.
41
42 double _vtime_mark_accum;
43
44 public:
45 virtual void run();
46
47 private:
48 ConcurrentMark* _cm;
49 volatile bool _started;
50 volatile bool _in_progress;
51
52 void sleepBeforeNextCycle();
53
54 static SurrogateLockerThread* _slt;
55
56 public:
57 // Constructor
58 ConcurrentMarkThread(ConcurrentMark* cm);
59
60 static void makeSurrogateLockerThread(TRAPS);
61 static SurrogateLockerThread* slt() { return _slt; }
62
|
23 */
24
25 #ifndef SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP
26 #define SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP
27
28 #include "gc/shared/concurrentGCThread.hpp"
29
30 // The Concurrent Mark GC Thread (could be several in the future).
31 // This is copied from the Concurrent Mark Sweep GC Thread
32 // Still under construction.
33
34 class ConcurrentMark;
35
36 class ConcurrentMarkThread: public ConcurrentGCThread {
37 friend class VMStructs;
38
39 double _vtime_start; // Initial virtual time.
40 double _vtime_accum; // Accumulated virtual time.
41
42 double _vtime_mark_accum;
43 void cm_log(bool doit, const char* fmt, ...) ATTRIBUTE_PRINTF(3, 4);
44
45 public:
46 virtual void run();
47
48 private:
49 ConcurrentMark* _cm;
50 volatile bool _started;
51 volatile bool _in_progress;
52
53 void sleepBeforeNextCycle();
54
55 static SurrogateLockerThread* _slt;
56
57 public:
58 // Constructor
59 ConcurrentMarkThread(ConcurrentMark* cm);
60
61 static void makeSurrogateLockerThread(TRAPS);
62 static SurrogateLockerThread* slt() { return _slt; }
63
|