mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6700789: G1: Enable use of compressed oops with G1 heaps
Modifications to G1 so as to allow the use of compressed oops. Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
This commit is contained in:
parent
50d7db1805
commit
075c1335cb
58 changed files with 1233 additions and 1175 deletions
|
@ -64,15 +64,18 @@ bool ParallelTaskTerminator::peek_in_queue_set() {
|
|||
}
|
||||
|
||||
void ParallelTaskTerminator::yield() {
|
||||
assert(_offered_termination <= _n_threads, "Invariant");
|
||||
os::yield();
|
||||
}
|
||||
|
||||
void ParallelTaskTerminator::sleep(uint millis) {
|
||||
assert(_offered_termination <= _n_threads, "Invariant");
|
||||
os::sleep(Thread::current(), millis, false);
|
||||
}
|
||||
|
||||
bool
|
||||
ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) {
|
||||
assert(_offered_termination < _n_threads, "Invariant");
|
||||
Atomic::inc(&_offered_termination);
|
||||
|
||||
uint yield_count = 0;
|
||||
|
@ -96,6 +99,7 @@ ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) {
|
|||
// Loop waiting for all threads to offer termination or
|
||||
// more work.
|
||||
while (true) {
|
||||
assert(_offered_termination <= _n_threads, "Invariant");
|
||||
// Are all threads offering termination?
|
||||
if (_offered_termination == _n_threads) {
|
||||
return true;
|
||||
|
@ -151,6 +155,7 @@ ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) {
|
|||
if (peek_in_queue_set() ||
|
||||
(terminator != NULL && terminator->should_exit_termination())) {
|
||||
Atomic::dec(&_offered_termination);
|
||||
assert(_offered_termination < _n_threads, "Invariant");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue