< prev index next >
src/share/vm/code/oopRecorder.cpp
Print this page
rev 12854 : [mq]: gcinterface.patch
*** 158,174 ****
template class ValueRecorder<Metadata*>;
template class ValueRecorder<jobject>;
oop ObjectLookup::ObjectEntry::oop_value() const { return JNIHandles::resolve(_value); }
! ObjectLookup::ObjectLookup(): _gc_count(Universe::heap()->total_collections()), _values(4) {}
void ObjectLookup::maybe_resort() {
// The values are kept sorted by address which may be invalidated
// after a GC, so resort if a GC has occurred since last time.
! if (_gc_count != Universe::heap()->total_collections()) {
! _gc_count = Universe::heap()->total_collections();
_values.sort(sort_by_address);
}
}
int ObjectLookup::sort_by_address(oop a, oop b) {
--- 158,174 ----
template class ValueRecorder<Metadata*>;
template class ValueRecorder<jobject>;
oop ObjectLookup::ObjectEntry::oop_value() const { return JNIHandles::resolve(_value); }
! ObjectLookup::ObjectLookup(): _gc_count(GC::gc()->heap()->total_collections()), _values(4) {}
void ObjectLookup::maybe_resort() {
// The values are kept sorted by address which may be invalidated
// after a GC, so resort if a GC has occurred since last time.
! if (_gc_count != GC::gc()->heap()->total_collections()) {
! _gc_count = GC::gc()->heap()->total_collections();
_values.sort(sort_by_address);
}
}
int ObjectLookup::sort_by_address(oop a, oop b) {
< prev index next >