| 89 | } |
| 90 | |
| 91 | bool KittyPerfWatch::disable() |
| 92 | { |
| 93 | for (auto &w : _watches) |
| 94 | { |
| 95 | if (w.fd >= 0) |
| 96 | { |
| 97 | ioctl(w.fd, PERF_EVENT_IOC_RESET, 0); |
| 98 | if (ioctl(w.fd, PERF_EVENT_IOC_DISABLE, 0) < 0) |
| 99 | return false; |
| 100 | } |
| 101 | } |
| 102 | return true; |
| 103 | } |
| 104 | |
| 105 | void KittyPerfWatch::clear() |
| 106 | { |
nothing calls this directly
no outgoing calls
no test coverage detected