svn commit: r214145 - head/tools/tools/syscall_timing
Robert Watson
rwatson at FreeBSD.org
Thu Oct 21 17:35:09 UTC 2010
Author: rwatson
Date: Thu Oct 21 17:35:08 2010
New Revision: 214145
URL: http://svn.freebsd.org/changeset/base/214145
Log:
Fix bug in recent syscall_timing change: measure the number of iterations
each loop, rather than once up front. The distinction is unimportant
when doing a fix iteration count, but when using a timer, it should vary.
Sponsored by: Google, Inc.
MFC after: 2 weeks
Modified:
head/tools/tools/syscall_timing/syscall_timing.c
Modified: head/tools/tools/syscall_timing/syscall_timing.c
==============================================================================
--- head/tools/tools/syscall_timing/syscall_timing.c Thu Oct 21 17:29:32 2010 (r214144)
+++ head/tools/tools/syscall_timing/syscall_timing.c Thu Oct 21 17:35:08 2010 (r214145)
@@ -671,11 +671,12 @@ main(int argc, char *argv[])
/*
* Run one warmup, then do the real thing (loops) times.
*/
- calls = the_test->t_func(iterations, the_test->t_int,
+ the_test->t_func(iterations, the_test->t_int,
the_test->t_string);
+ calls = 0;
for (k = 0; k < loops; k++) {
- the_test->t_func(iterations, the_test->t_int,
- the_test->t_string);
+ calls = the_test->t_func(iterations,
+ the_test->t_int, the_test->t_string);
timespecsub(&ts_end, &ts_start);
printf("%s\t%d\t", the_test->t_name, k);
printf("%ju.%09ju\t%d\t", (uintmax_t)ts_end.tv_sec,
More information about the svn-src-all
mailing list