Print warning when microbenchmarking w/ powersave

RDTSC on Linux has so much jitter when the CPU is in powersave mode
causing things like microbenchmarks to have a 1000% margin of error
This commit is contained in:
Justine Tunney 2022-06-10 20:51:36 -07:00
parent 41c86fe86b
commit c6d8e516b2
5 changed files with 64 additions and 4 deletions

View file

@ -115,6 +115,7 @@ void __morph_end(void);
unsigned char *GetFirstInstruction(void);
unsigned char *GetInstructionLengths(void);
void __print_maps(void);
void __warn_if_powersave(void);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */