< prev index next > src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
Print this page
*/
#include "precompiled.hpp"
#include "gc/g1/g1FullGCCompactionPoint.hpp"
#include "gc/g1/heapRegion.hpp"
+ #include "gc/shared/slidingForwarding.inline.hpp"
#include "oops/oop.inline.hpp"
#include "utilities/debug.hpp"
G1FullGCCompactionPoint::G1FullGCCompactionPoint() :
_current_region(NULL),
// Get the next region and re-initialize the values.
_current_region = next_region();
initialize_values(true);
}
- void G1FullGCCompactionPoint::forward(oop object, size_t size) {
+ void G1FullGCCompactionPoint::forward(SlidingForwarding* const forwarding, oop object, size_t size) {
assert(_current_region != NULL, "Must have been initialized");
// Ensure the object fit in the current region.
while (!object_will_fit(size)) {
switch_region();
}
// Store a forwarding pointer if the object should be moved.
if (cast_from_oop<HeapWord*>(object) != _compaction_top) {
- object->forward_to(cast_to_oop(_compaction_top));
+ forwarding->forward_to(object, cast_to_oop(_compaction_top));
} else {
+ assert(!object->is_forwarded(), "should not be forwarded");
+ /*
if (object->forwardee() != NULL) {
// Object should not move but mark-word is used so it looks like the
// object is forwarded. Need to clear the mark and it's no problem
// since it will be restored by preserved marks. There is an exception
// with BiasedLocking, in this case forwardee() will return NULL
(UseBiasedLocking && object->has_bias_pattern()), // Will be restored by BiasedLocking
"should have correct prototype obj: " PTR_FORMAT " mark: " PTR_FORMAT " prototype: " PTR_FORMAT,
p2i(object), object->mark().value(), markWord::prototype_for_klass(object->klass()).value());
}
assert(object->forwardee() == NULL, "should be forwarded to NULL");
+ */
}
// Update compaction values.
_compaction_top += size;
if (_compaction_top > _threshold) {
< prev index next >