Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Go to the documentation of this file. 7 #if defined(__i386__) || defined(__x86_64__) 15 #elif defined(__linux__) 18 #include <sys/syscall.h> 19 #include <linux/perf_event.h> 22 static struct perf_event_attr attr;
26 attr.type = PERF_TYPE_HARDWARE;
27 attr.config = PERF_COUNT_HW_CPU_CYCLES;
28 fd = syscall(__NR_perf_event_open, &attr, 0, -1, -1, 0);
41 if (fd == -1 || read(fd, &result,
sizeof(result)) < (ssize_t)
sizeof(result)) {
uint64_t perf_cpucycles(void)
Functions for measurement of CPU cycles.