diff --git a/runtime/include/perf_window.h b/runtime/include/perf_window.h index b155774..c2f293c 100644 --- a/runtime/include/perf_window.h +++ b/runtime/include/perf_window.h @@ -3,7 +3,12 @@ #include #include -#define PERF_WINDOW_BUFFER_SIZE 10 +/* Should be Power of 2! */ +#define PERF_WINDOW_BUFFER_SIZE 16 + +#if ((PERF_WINDOW_BUFFER_SIZE == 0) || (PERF_WINDOW_BUFFER_SIZE & (PERF_WINDOW_BUFFER_SIZE - 1)) != 0) +#error "PERF_WINDOW_BUFFER_SIZE must be power of 2!" +#endif struct perf_window { uint64_t buffer[PERF_WINDOW_BUFFER_SIZE];