| 257 | } |
| 258 | |
| 259 | CodeCache* 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 | |
| 274 | CodeCache* Profiler::findLibraryByAddress(const void* address) { |
| 275 | const int native_lib_count = _native_libs.count(); |
no test coverage detected