| 93 | static dlopen_t _orig_dlopen = NULL; |
| 94 | |
| 95 | static void* dlopen_hook_impl(const char* filename, int flags, bool patch) { |
| 96 | Log::debug("dlopen: %s", filename); |
| 97 | void* result = _orig_dlopen(filename, flags); |
| 98 | if (result != NULL && filename != NULL) { |
| 99 | Profiler::instance()->updateSymbols(false); |
| 100 | if (patch) { |
| 101 | Hooks::patchLibraries(); |
| 102 | } |
| 103 | MallocTracer::installHooks(); |
| 104 | NativeLockTracer::installHooks(); |
| 105 | } |
| 106 | return result; |
| 107 | } |
| 108 | |
| 109 | static void* dlopen_hook(const char* filename, int flags) { |
| 110 | return dlopen_hook_impl(filename, flags, true); |
no test coverage detected