| 102 | } |
| 103 | |
| 104 | bool readRaw(uint64_t* values) { |
| 105 | if (m_err || !useCounters()) return false; |
| 106 | init_if_not(); |
| 107 | |
| 108 | if (m_fd > 0) { |
| 109 | /* |
| 110 | * read the count + scaling values |
| 111 | * |
| 112 | * It is not necessary to stop an event to read its value |
| 113 | */ |
| 114 | auto ret = ::read(m_fd, values, sizeof(*values) * 3); |
| 115 | if (ret == sizeof(*values) * 3) { |
| 116 | values[0] -= reset_values[0]; |
| 117 | values[1] -= reset_values[1]; |
| 118 | values[2] -= reset_values[2]; |
| 119 | return true; |
| 120 | } |
| 121 | } |
| 122 | return false; |
| 123 | } |
| 124 | |
| 125 | void reset() { |
| 126 | if (m_err || !useCounters()) return; |
nothing calls this directly
no test coverage detected