| 75 | } |
| 76 | |
| 77 | bool KittyPerfWatch::enable() |
| 78 | { |
| 79 | for (auto &w : _watches) |
| 80 | { |
| 81 | if (w.fd >= 0) |
| 82 | { |
| 83 | ioctl(w.fd, PERF_EVENT_IOC_RESET, 0); |
| 84 | if (ioctl(w.fd, PERF_EVENT_IOC_ENABLE, 0) < 0) |
| 85 | return false; |
| 86 | } |
| 87 | } |
| 88 | return true; |
| 89 | } |
| 90 | |
| 91 | bool KittyPerfWatch::disable() |
| 92 | { |
nothing calls this directly
no outgoing calls
no test coverage detected