equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2018, 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. |
536 |
536 |
537 inline void ParallelCompactData::RegionData::decrement_destination_count() |
537 inline void ParallelCompactData::RegionData::decrement_destination_count() |
538 { |
538 { |
539 assert(_dc_and_los < dc_claimed, "already claimed"); |
539 assert(_dc_and_los < dc_claimed, "already claimed"); |
540 assert(_dc_and_los >= dc_one, "count would go negative"); |
540 assert(_dc_and_los >= dc_one, "count would go negative"); |
541 Atomic::add((int)dc_mask, (volatile int*)&_dc_and_los); |
541 Atomic::add(dc_mask, &_dc_and_los); |
542 } |
542 } |
543 |
543 |
544 inline HeapWord* ParallelCompactData::RegionData::data_location() const |
544 inline HeapWord* ParallelCompactData::RegionData::data_location() const |
545 { |
545 { |
546 DEBUG_ONLY(return _data_location;) |
546 DEBUG_ONLY(return _data_location;) |
576 } |
576 } |
577 |
577 |
578 inline void ParallelCompactData::RegionData::add_live_obj(size_t words) |
578 inline void ParallelCompactData::RegionData::add_live_obj(size_t words) |
579 { |
579 { |
580 assert(words <= (size_t)los_mask - live_obj_size(), "overflow"); |
580 assert(words <= (size_t)los_mask - live_obj_size(), "overflow"); |
581 Atomic::add((int) words, (volatile int*) &_dc_and_los); |
581 Atomic::add(static_cast<region_sz_t>(words), &_dc_and_los); |
582 } |
582 } |
583 |
583 |
584 inline void ParallelCompactData::RegionData::set_highest_ref(HeapWord* addr) |
584 inline void ParallelCompactData::RegionData::set_highest_ref(HeapWord* addr) |
585 { |
585 { |
586 #ifdef ASSERT |
586 #ifdef ASSERT |