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

Method findLibraryByName

src/profiler.cpp:259–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259CodeCache* Profiler::findLibraryByName(const char* lib_name) {
260 const size_t lib_name_len = strlen(lib_name);
261 const int native_lib_count = _native_libs.count();
262 for (int i = 0; i < native_lib_count; i++) {
263 const char* s = _native_libs[i]->name();
264 if (s != NULL) {
265 const char* p = strrchr(s, '/');
266 if (p != NULL && strncmp(p + 1, lib_name, lib_name_len) == 0) {
267 return _native_libs[i];
268 }
269 }
270 }
271 return NULL;
272}
273
274CodeCache* Profiler::findLibraryByAddress(const void* address) {
275 const int native_lib_count = _native_libs.count();

Callers 3

symbolsTest.cppFile · 0.80
checkJvmLoadedMethod · 0.80
setupThreadHookMethod · 0.80

Calls 2

countMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected