< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahObjectMarker.cpp
Print this page
*** 24,59 ****
#include "precompiled.hpp"
#include "gc/shared/markBitMap.inline.hpp"
#include "gc/shenandoah/shenandoahObjectMarker.hpp"
! bool ShenandoahObjectMarker::init() {
! assert(SafepointSynchronize::is_at_safepoint(), "safe iteration is only available during safepoints");
! // Bailout if failed to commit aux bitmap
! if (!_heap->commit_aux_bitmap()) {
! _bit_map = NULL;
! return false;
! }
! _bit_map->clear();
! return true;
! }
!
! void ShenandoahObjectMarker::done() {
! if (_bit_map != NULL) {
! _heap->uncommit_aux_bit_map();
! }
! delete this;
! }
!
! bool ShenandoahObjectMarker::mark(oop o) {
! assert(_bit_map != NULL, "Should have been bailed out");
! if (_bit_map->is_marked(o)) return false;
! _bit_map->mark(o);
! return true;
! }
!
! bool ShenandoahObjectMarker::visited(oop o) {
! assert(_bit_map != NULL, "Should have been bailed out");
! return _bit_map->is_marked(o);
! }
--- 24,60 ----
#include "precompiled.hpp"
#include "gc/shared/markBitMap.inline.hpp"
+ #include "gc/shenandoah/shenandoahHeap.hpp"
#include "gc/shenandoah/shenandoahObjectMarker.hpp"
! bool ShenandoahObjectMarker::init() {
! assert(SafepointSynchronize::is_at_safepoint(), "safe iteration is only available during safepoints");
! // Bailout if failed to commit aux bitmap
! if (!_heap->commit_aux_bitmap()) {
! _bit_map = NULL;
! return false;
! }
! _bit_map->clear();
! return true;
! }
!
! void ShenandoahObjectMarker::done() {
! if (_bit_map != NULL) {
! _heap->uncommit_aux_bit_map();
! }
! delete this;
! }
!
! bool ShenandoahObjectMarker::mark(oop o) {
! assert(_bit_map != NULL, "Should have been bailed out");
! if (_bit_map->is_marked(o)) return false;
! _bit_map->mark(o);
! return true;
! }
!
! bool ShenandoahObjectMarker::marked(oop o) {
! assert(_bit_map != NULL, "Should have been bailed out");
! return _bit_map->is_marked(o);
! }
< prev index next >