230 bool do_object_b(oop p) { return true; }
231 };
232 static AlwaysTrueClosure always_true;
233
234 void SharedHeap::process_weak_roots(OopClosure* root_closure,
235 CodeBlobClosure* code_roots) {
236 // Global (weak) JNI handles
237 JNIHandles::weak_oops_do(&always_true, root_closure);
238
239 CodeCache::blobs_do(code_roots);
240 StringTable::oops_do(root_closure);
241 }
242
243 void SharedHeap::set_barrier_set(BarrierSet* bs) {
244 _barrier_set = bs;
245 // Cached barrier set for fast access in oops
246 oopDesc::set_bs(bs);
247 }
248
249 void SharedHeap::post_initialize() {
250 ref_processing_init();
251 }
252
253 void SharedHeap::ref_processing_init() {}
254
255 // Some utilities.
256 void SharedHeap::print_size_transition(outputStream* out,
257 size_t bytes_before,
258 size_t bytes_after,
259 size_t capacity) {
260 out->print(" %d%s->%d%s(%d%s)",
261 byte_size_in_proper_unit(bytes_before),
262 proper_unit_for_byte_size(bytes_before),
263 byte_size_in_proper_unit(bytes_after),
264 proper_unit_for_byte_size(bytes_after),
265 byte_size_in_proper_unit(capacity),
266 proper_unit_for_byte_size(capacity));
267 }
|
230 bool do_object_b(oop p) { return true; }
231 };
232 static AlwaysTrueClosure always_true;
233
234 void SharedHeap::process_weak_roots(OopClosure* root_closure,
235 CodeBlobClosure* code_roots) {
236 // Global (weak) JNI handles
237 JNIHandles::weak_oops_do(&always_true, root_closure);
238
239 CodeCache::blobs_do(code_roots);
240 StringTable::oops_do(root_closure);
241 }
242
243 void SharedHeap::set_barrier_set(BarrierSet* bs) {
244 _barrier_set = bs;
245 // Cached barrier set for fast access in oops
246 oopDesc::set_bs(bs);
247 }
248
249 void SharedHeap::post_initialize() {
250 CollectedHeap::post_initialize();
251 ref_processing_init();
252 }
253
254 void SharedHeap::ref_processing_init() {}
255
256 // Some utilities.
257 void SharedHeap::print_size_transition(outputStream* out,
258 size_t bytes_before,
259 size_t bytes_after,
260 size_t capacity) {
261 out->print(" %d%s->%d%s(%d%s)",
262 byte_size_in_proper_unit(bytes_before),
263 proper_unit_for_byte_size(bytes_before),
264 byte_size_in_proper_unit(bytes_after),
265 proper_unit_for_byte_size(bytes_after),
266 byte_size_in_proper_unit(capacity),
267 proper_unit_for_byte_size(capacity));
268 }
|