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

Function loadProfiler

test/test/nonjava/non_java_app.cpp:55–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void loadProfiler() {
56 void* lib = dlopen(profiler_lib_path, RTLD_NOW | RTLD_GLOBAL);
57 if (lib == NULL) {
58 std::cerr << dlerror() << std::endl;
59 exit(1);
60 }
61
62 _asprof_init = (asprof_init_t)dlsym(lib, "asprof_init");
63 _asprof_execute = (asprof_execute_t)dlsym(lib, "asprof_execute");
64 _asprof_error_str = (asprof_error_str_t)dlsym(lib, "asprof_error_str");
65
66 _asprof_init();
67}
68
69void startProfiler() {
70 asprof_error_t err = _asprof_execute("start,event=cpu,interval=1ms,cstack=vmx", outputCallback);

Callers 4

testFlow1Function · 0.85
testFlow2Function · 0.85
testFlow3Function · 0.85
testFlow4Function · 0.85

Calls 1

dlopenFunction · 0.85

Tested by

no test coverage detected