< prev index next >
src/share/vm/gc/shared/preservedMarks.inline.hpp
Print this page
*** 47,79 ****
inline void PreservedMarks::init_forwarded_mark(oop obj) {
obj->init_mark();
}
! template <class E>
! inline void PreservedMarksSet::restore(E* executor) {
volatile size_t total_size = 0;
#ifdef ASSERT
// This is to make sure the total_size we'll calculate below is correct.
size_t total_size_before = 0;
for (uint i = 0; i < _num; i += 1) {
total_size_before += get(i)->size();
}
#endif // def ASSERT
! if (executor == NULL) {
! for (uint i = 0; i < _num; i += 1) {
! total_size += get(i)->size();
! get(i)->restore();
! }
! } else {
! // Right now, if the executor is not NULL we do the work in
! // parallel. In the future we might want to do the restoration
! // serially, if there's only a small number of marks per stack.
! restore_internal(executor, &total_size);
! }
assert_empty();
assert(total_size == total_size_before,
"total_size = " SIZE_FORMAT " before = " SIZE_FORMAT,
total_size, total_size_before);
--- 47,68 ----
inline void PreservedMarks::init_forwarded_mark(oop obj) {
obj->init_mark();
}
! inline void PreservedMarksSet::restore(RestorePreservedMarksTaskExecutor* executor) {
volatile size_t total_size = 0;
#ifdef ASSERT
// This is to make sure the total_size we'll calculate below is correct.
size_t total_size_before = 0;
for (uint i = 0; i < _num; i += 1) {
total_size_before += get(i)->size();
}
#endif // def ASSERT
! executor->restore(this, &total_size);
assert_empty();
assert(total_size == total_size_before,
"total_size = " SIZE_FORMAT " before = " SIZE_FORMAT,
total_size, total_size_before);
< prev index next >