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

Function dlopen_hook_impl

src/hooks.cpp:95–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93static dlopen_t _orig_dlopen = NULL;
94
95static 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
109static void* dlopen_hook(const char* filename, int flags) {
110 return dlopen_hook_impl(filename, flags, true);

Callers 2

dlopen_hookFunction · 0.85
dlopenFunction · 0.85

Calls 1

updateSymbolsMethod · 0.80

Tested by

no test coverage detected