mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
6951083: oops and relocations should part of nmethod not CodeBlob
This moves the oops from Codeblob to nmethod. Reviewed-by: kvn, never
This commit is contained in:
parent
a13355babf
commit
c9f2ba541b
20 changed files with 250 additions and 295 deletions
|
@ -74,12 +74,12 @@ class CodeBlob_sizes {
|
|||
total_size += cb->size();
|
||||
header_size += cb->header_size();
|
||||
relocation_size += cb->relocation_size();
|
||||
scopes_oop_size += cb->oops_size();
|
||||
if (cb->is_nmethod()) {
|
||||
nmethod *nm = (nmethod*)cb;
|
||||
nmethod* nm = cb->as_nmethod_or_null();
|
||||
code_size += nm->code_size();
|
||||
stub_size += nm->stub_size();
|
||||
|
||||
scopes_oop_size += nm->oops_size();
|
||||
scopes_data_size += nm->scopes_data_size();
|
||||
scopes_pcs_size += nm->scopes_pcs_size();
|
||||
} else {
|
||||
|
@ -262,14 +262,14 @@ int CodeCache::alignment_offset() {
|
|||
}
|
||||
|
||||
|
||||
// Mark code blobs for unloading if they contain otherwise
|
||||
// unreachable oops.
|
||||
// Mark nmethods for unloading if they contain otherwise unreachable
|
||||
// oops.
|
||||
void CodeCache::do_unloading(BoolObjectClosure* is_alive,
|
||||
OopClosure* keep_alive,
|
||||
bool unloading_occurred) {
|
||||
assert_locked_or_safepoint(CodeCache_lock);
|
||||
FOR_ALL_ALIVE_BLOBS(cb) {
|
||||
cb->do_unloading(is_alive, keep_alive, unloading_occurred);
|
||||
FOR_ALL_ALIVE_NMETHODS(nm) {
|
||||
nm->do_unloading(is_alive, keep_alive, unloading_occurred);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -509,9 +509,9 @@ void CodeCache::gc_epilogue() {
|
|||
if (needs_cache_clean()) {
|
||||
nm->cleanup_inline_caches();
|
||||
}
|
||||
debug_only(nm->verify();)
|
||||
DEBUG_ONLY(nm->verify());
|
||||
nm->fix_oop_relocations();
|
||||
}
|
||||
cb->fix_oop_relocations();
|
||||
}
|
||||
set_needs_cache_clean(false);
|
||||
prune_scavenge_root_nmethods();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue