< prev index next > src/hotspot/share/gc/shared/preservedMarks.cpp
Print this page
*
*/
#include "precompiled.hpp"
#include "gc/shared/preservedMarks.inline.hpp"
+ #include "gc/shared/slidingForwarding.inline.hpp"
#include "gc/shared/workerThread.hpp"
#include "gc/shared/workerUtils.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
elem.set_mark();
}
assert_empty();
}
+ // TODO: This method is unused, except in the gunit test. Change the test
+ // to exercise the updated method below instead, and remove this one.
void PreservedMarks::adjust_during_full_gc() {
StackIterator<OopAndMarkWord, mtGC> iter(_stack);
while (!iter.is_empty()) {
OopAndMarkWord* elem = iter.next_addr();
elem->set_oop(obj->forwardee());
}
}
}
+ void PreservedMarks::adjust_during_full_gc(const SlidingForwarding* const forwarding) {
+ StackIterator<OopAndMarkWord, mtGC> iter(_stack);
+ while (!iter.is_empty()) {
+ OopAndMarkWord* elem = iter.next_addr();
+
+ oop obj = elem->get_oop();
+ if (obj->is_forwarded()) {
+ elem->set_oop(forwarding->forwardee(obj));
+ }
+ }
+ }
+
void PreservedMarks::restore_and_increment(volatile size_t* const total_size_addr) {
const size_t stack_size = size();
restore();
// Only do the atomic add if the size is > 0.
if (stack_size > 0) {
< prev index next >