Fix pthread_kill_test flake on qemu

This commit is contained in:
Justine Tunney 2024-08-16 21:18:26 -07:00
parent 732554ce3a
commit 098638cc6c
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3 changed files with 20 additions and 16 deletions

View file

@ -17,6 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/calls.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/fmt/itoa.h"
#include "libc/runtime/runtime.h"
@ -31,6 +32,8 @@ void CheckForFileLeaks(void) {
char *p = msg;
char *pe = msg + 256;
bool gotsome = false;
if (IsQemuUser())
usleep(1); // weird qemu mt flake
for (int fd = 3; fd < MIN_CLANDESTINE_FD; ++fd) {
if (fcntl(fd, F_GETFL) != -1) {
if (!gotsome) {

View file

@ -14,22 +14,22 @@
// with futexes
// 30 threads / 100000 iterations
//
// 54,183 us real
// 84,723 us user
// 741,667 us sys
// footek_test on studio.test. 609 µs 14'106 µs 65'607 µs
// 406,588 us real
// 884,696 us user
// 720,567 us sys
// footek_test on pi5.test. 334 µs 13'398 µs 408'450 µs
// 1,253,808 us real
// 3,608,426 us user
// 1,378,765 us sys
// footek_test on freebsdarm.test. 367 µs 16'466 µs 1'287'915 µs
// 1,316,058 us real
// 3,286,528 us user
// 1,738,756 us sys
// footek_test on pi.test. 450 µs 16'787 µs 1'338'420 µs
// 46,481 us real
// 68,745 us user
// 586,871 us sys
// footek_test on studio.test. 585 µs 13'597 µs 57'473 µs
// 389,619 us real
// 839,848 us user
// 679,112 us sys
// footek_test on pi5.test. 335 µs 13'034 µs 432'358 µs
// 463,799 us real
// 1,259,267 us user
// 547,681 us sys
// footek_test on pi.test. 479 µs 16'539 µs 476'395 µs
// 1,256,134 us real
// 3,770,473 us user
// 1,214,755 us sys
// footek_test on freebsdarm.test. 364 µs 16'898 µs 1'288'594 µs
// arm fleet
// without futexes

View file

@ -73,6 +73,7 @@
"__BMI2__"
"__FMA__"
"__FAST_MATH__"
"__FINITE_MATH_ONLY__"
"__ROUNDING_MATH__"
"__NO_MATH_ERRNO__"
"__FMA4__"