< prev index next >
src/share/vm/oops/constantPool.cpp
Print this page
rev 14282 : Factor out keep-alive barrier from usual pre-barrier implementations.
@@ -46,13 +46,10 @@
#include "runtime/init.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/signature.hpp"
#include "runtime/vframe.hpp"
#include "utilities/copy.hpp"
-#if INCLUDE_ALL_GCS
-#include "gc/g1/g1SATBCardTableModRefBS.hpp"
-#endif // INCLUDE_ALL_GCS
ConstantPool* ConstantPool::allocate(ClassLoaderData* loader_data, int length, TRAPS) {
Array<u1>* tags = MetadataFactory::new_array<u1>(loader_data, length, 0, CHECK_NULL);
int size = ConstantPool::size(length);
return new (loader_data, size, MetaspaceObj::ConstantPoolType, THREAD) ConstantPool(tags);
@@ -306,11 +303,11 @@
oop archived = _cache->archived_references();
// Make sure GC knows the cached object is now live. This is necessary after
// initial GC marking and during concurrent marking as strong roots are only
// scanned during initial marking (at the start of the GC marking).
assert(UseG1GC, "Requires G1 GC");
- G1SATBCardTableModRefBS::enqueue(archived);
+ oopDesc::bs()->keep_alive_barrier(archived);
// Create handle for the archived resolved reference array object
Handle refs_handle(THREAD, (oop)archived);
set_resolved_references(loader_data->add_handle(refs_handle));
} else
#endif
< prev index next >