| 76 | static bool multiplex_state_dirty = false; |
| 77 | |
| 78 | static int fetchInt(const char* file_name) { |
| 79 | int fd = open(file_name, O_RDONLY); |
| 80 | if (fd == -1) { |
| 81 | return 0; |
| 82 | } |
| 83 | |
| 84 | char num[16] = "0"; |
| 85 | ssize_t r = read(fd, num, sizeof(num) - 1); |
| 86 | (void) r; |
| 87 | close(fd); |
| 88 | return atoi(num); |
| 89 | } |
| 90 | |
| 91 | // Get perf_event_attr.config numeric value of the given tracepoint name |
| 92 | // by reading /sys/kernel/tracing/events/<name>/id (since 4.1) |
no outgoing calls
no test coverage detected