For BCI_NATIVE_FRAME, library index is encoded ahead of the symbol name
| 241 | |
| 242 | // For BCI_NATIVE_FRAME, library index is encoded ahead of the symbol name |
| 243 | const char* Profiler::getLibraryName(const char* native_symbol) { |
| 244 | short lib_index = NativeFunc::libIndex(native_symbol); |
| 245 | if (lib_index >= 0 && lib_index < _native_libs.count()) { |
| 246 | const char* s = _native_libs[lib_index]->name(); |
| 247 | if (s != NULL) { |
| 248 | const char* p = strrchr(s, '/'); |
| 249 | return p != NULL ? p + 1 : s; |
| 250 | } |
| 251 | } |
| 252 | return NULL; |
| 253 | } |
| 254 | |
| 255 | CodeCache* Profiler::findJvmLibrary(const char* lib_name) { |
| 256 | return VM::isOpenJ9() ? findLibraryByName(lib_name) : VMStructs::libjvm(); |
no test coverage detected