Normalize a perf event name. After normalization the event name should match an event field in the PerfStatistics protobuf.
| 66 | // Normalize a perf event name. After normalization the event name |
| 67 | // should match an event field in the PerfStatistics protobuf. |
| 68 | inline string normalize(const string& s) |
| 69 | { |
| 70 | string lower = strings::lower(s); |
| 71 | return strings::replace(lower, "-", "_"); |
| 72 | } |
| 73 | |
| 74 | |
| 75 | // Executes the 'perf' command using the supplied arguments, and |