Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/hotspot/share/code/codeBlob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -870,9 +870,10 @@ void CodeBlob::dump_for_addr(address addr, outputStream* st, bool verbose) const
return;
}
//
if (AdapterHandlerLibrary::contains(this)) {
if (is_adapter_blob()) {
st->print_cr(INTPTR_FORMAT " is at code_begin+%d in an AdapterHandler", p2i(addr), (int)(addr - code_begin()));
AdapterHandlerLibrary::print_handler_on(st, this);
return;
}
// the stubroutines are generated into a buffer blob
StubCodeDesc* d = StubCodeDesc::desc_for(addr);
Expand Down
34 changes: 2 additions & 32 deletions src/hotspot/share/runtime/sharedRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3396,42 +3396,12 @@ uint32_t AdapterHandlerLibrary::id(AdapterHandlerEntry* handler) {
return handler->id();
}

bool AdapterHandlerLibrary::contains(const CodeBlob* b) {
bool found = false;
#if INCLUDE_CDS
if (AOTCodeCache::is_using_adapter()) {
auto findblob_archived_table = [&] (AdapterHandlerEntry* handler) {
if (b == CodeCache::find_blob(handler->get_i2c_entry())) {
found = true;
return false; // abort iteration
} else {
return true; // keep looking
}
};
_aot_adapter_handler_table.iterate(findblob_archived_table);
}
#endif // INCLUDE_CDS
if (!found) {
auto findblob_runtime_table = [&] (AdapterFingerPrint* key, AdapterHandlerEntry* handler) {
if (b == CodeCache::find_blob(handler->get_i2c_entry())) {
found = true;
return false; // abort iteration
} else {
return true; // keep looking
}
};
assert_locked_or_safepoint(AdapterHandlerLibrary_lock);
_adapter_handler_table->iterate(findblob_runtime_table);
}
return found;
}

void AdapterHandlerLibrary::print_handler_on(outputStream* st, const CodeBlob* b) {
bool found = false;
#if INCLUDE_CDS
if (AOTCodeCache::is_using_adapter()) {
auto findblob_archived_table = [&] (AdapterHandlerEntry* handler) {
if (b == CodeCache::find_blob(handler->get_i2c_entry())) {
if (b == handler->adapter_blob()) {
found = true;
st->print("Adapter for signature: ");
handler->print_adapter_on(st);
Expand All @@ -3445,7 +3415,7 @@ void AdapterHandlerLibrary::print_handler_on(outputStream* st, const CodeBlob* b
#endif // INCLUDE_CDS
if (!found) {
auto findblob_runtime_table = [&] (AdapterFingerPrint* key, AdapterHandlerEntry* handler) {
if (b == CodeCache::find_blob(handler->get_i2c_entry())) {
if (b == handler->adapter_blob()) {
found = true;
st->print("Adapter for signature: ");
handler->print_adapter_on(st);
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/runtime/sharedRuntime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,6 @@ class AdapterHandlerLibrary: public AllStatic {

static void print_handler(const CodeBlob* b) { print_handler_on(tty, b); }
static void print_handler_on(outputStream* st, const CodeBlob* b);
static bool contains(const CodeBlob* b);
static const char* name(AdapterHandlerEntry* handler);
static uint32_t id(AdapterHandlerEntry* handler);
#ifndef PRODUCT
Expand Down