| 87 | sigset_t sigprof_set; |
| 88 | |
| 89 | void initProfiling() { |
| 90 | net2backtraces = new volatile void*[net2backtraces_max]; |
| 91 | other_backtraces = new volatile void*[net2backtraces_max]; |
| 92 | |
| 93 | // According to folk wisdom, calling this once before setting up the signal handler makes |
| 94 | // it async signal safe in practice :-/ |
| 95 | backtrace(const_cast<void**>(other_backtraces), net2backtraces_max); |
| 96 | |
| 97 | sigemptyset(&sigprof_set); |
| 98 | sigaddset(&sigprof_set, SIGPROF); |
| 99 | } |
| 100 | #endif |
| 101 | |
| 102 | DESCR struct SlowTask { |
no outgoing calls
no test coverage detected