equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP |
25 #ifndef SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP |
26 #define SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP |
26 #define SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP |
27 |
27 |
|
28 #include "gc/shared/concurrentGCPhaseManager.hpp" |
28 #include "gc/shared/concurrentGCThread.hpp" |
29 #include "gc/shared/concurrentGCThread.hpp" |
29 |
30 |
30 // The Concurrent Mark GC Thread triggers the parallel G1CMConcurrentMarkingTasks |
31 // The Concurrent Mark GC Thread triggers the parallel G1CMConcurrentMarkingTasks |
31 // as well as handling various marking cleanup. |
32 // as well as handling various marking cleanup. |
32 |
33 |
47 Started, |
48 Started, |
48 InProgress |
49 InProgress |
49 }; |
50 }; |
50 |
51 |
51 volatile State _state; |
52 volatile State _state; |
|
53 |
|
54 // WhiteBox testing support. |
|
55 ConcurrentGCPhaseManager::Stack _phase_manager_stack; |
52 |
56 |
53 void sleepBeforeNextCycle(); |
57 void sleepBeforeNextCycle(); |
54 void delay_to_keep_mmu(G1Policy* g1_policy, bool remark); |
58 void delay_to_keep_mmu(G1Policy* g1_policy, bool remark); |
55 |
59 |
56 void run_service(); |
60 void run_service(); |
81 // cleared). While during_cycle() is true we will not start another cycle |
85 // cleared). While during_cycle() is true we will not start another cycle |
82 // so that cycles do not overlap. We cannot use just in_progress() |
86 // so that cycles do not overlap. We cannot use just in_progress() |
83 // as the CM thread might take some time to wake up before noticing |
87 // as the CM thread might take some time to wake up before noticing |
84 // that started() is set and set in_progress(). |
88 // that started() is set and set in_progress(). |
85 bool during_cycle() { return !idle(); } |
89 bool during_cycle() { return !idle(); } |
|
90 |
|
91 // WhiteBox testing support. |
|
92 const char* const* concurrent_phases() const; |
|
93 bool request_concurrent_phase(const char* phase); |
|
94 |
|
95 ConcurrentGCPhaseManager::Stack* phase_manager_stack() { |
|
96 return &_phase_manager_stack; |
|
97 } |
86 }; |
98 }; |
87 |
99 |
88 #endif // SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP |
100 #endif // SHARE_VM_GC_G1_CONCURRENTMARKTHREAD_HPP |