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

Method createForAllThreads

src/cpuEngine.cpp:95–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95int CpuEngine::createForAllThreads() {
96 int result = EPERM;
97
98 ThreadList* thread_list = OS::listThreads();
99 while (thread_list->hasNext()) {
100 int tid = thread_list->next();
101 int err = createForThread(tid);
102 if (isResourceLimit(err)) {
103 result = err;
104 break;
105 } else if (result != 0) {
106 result = err;
107 }
108 }
109 delete thread_list;
110
111 return result;
112}
113
114void CpuEngine::signalHandler(int signo, siginfo_t* siginfo, void* ucontext) {
115 if (!_enabled) return;

Callers

nothing calls this directly

Calls 2

hasNextMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected