[PATCH] benchtests: Cleanup bench-malloc-thread
DJ Delorie
dj@redhat.com
Fri Jun 6 20:31:16 GMT 2025
Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> Change duration to 3 seconds. Add spaces before '('.
Does changing the duration invalidate any existing results, or are
benchtests always a "build twice and compare" system?
I'd be interested in seeing the standard deviation for 10s vs 3s
results. Malloc times tend to be more chaotic than other parts of libc.
> -# define TEST_FUNC(size) malloc(size)
> +# define TEST_FUNC(size) malloc (size)
Ok.
> -#define BENCHMARK_DURATION 10
> +#define BENCHMARK_DURATION 3
See above.
> - pthread_create(&threads[i], NULL, benchmark_thread, &args[i]);
> + pthread_create (&threads[i], NULL, benchmark_thread, &args[i]);
Ok.
> - pthread_join(threads[i], NULL);
> + pthread_join (threads[i], NULL);
Ok.
> -static void usage(const char *name)
> +static void usage (const char *name)
Ok. GNU standards say the function's type goes on a separate line, so
that function names in function definitions always start at the
beginning of the line. Do we want to fix that here too? (optional)
> - ret = strtol(argv[1], NULL, 10);
> + ret = strtol (argv[1], NULL, 10);
Ok.
> - usage(argv[0]);
> + usage (argv[0]);
Ok.
> - usage(argv[0]);
> + usage (argv[0]);
Ok.
> - getrusage(RUSAGE_SELF, &usage);
> + getrusage (RUSAGE_SELF, &usage);
Ok.
More information about the Libc-alpha
mailing list