| 83 | } |
| 84 | |
| 85 | void PstackWatcher::Run() { |
| 86 | MutexLock guard(lock_); |
| 87 | if (!running_) return; |
| 88 | cond_.WaitFor(timeout_); |
| 89 | if (!running_) return; |
| 90 | |
| 91 | WARN_NOT_OK(DumpStacks(DUMP_FULL), "Unable to print pstack from watcher"); |
| 92 | running_ = false; |
| 93 | cond_.Broadcast(); |
| 94 | } |
| 95 | |
| 96 | Status PstackWatcher::HasProgram(const char* progname) { |
| 97 | Subprocess proc({ "which", progname } ); |
no test coverage detected