MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / getLibraryName

Method getLibraryName

src/profiler.cpp:243–253  ·  view source on GitHub ↗

For BCI_NATIVE_FRAME, library index is encoded ahead of the symbol name

Source from the content-addressed store, hash-verified

241
242// For BCI_NATIVE_FRAME, library index is encoded ahead of the symbol name
243const 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
255CodeCache* Profiler::findJvmLibrary(const char* lib_name) {
256 return VM::isOpenJ9() ? findLibraryByName(lib_name) : VMStructs::libjvm();

Callers 2

resolveMethodMethod · 0.80
decodeNativeSymbolMethod · 0.80

Calls 2

countMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected