summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-03-19 00:28:04 +0000
committerdes <des@FreeBSD.org>2001-03-19 00:28:04 +0000
commitbe09e32551bb460dec857b40cbb7ca630bafddf4 (patch)
treeb9f5833ad2dac4e9b796fc99f91c3291b669701e /sys/amd64
parent1601ad0a457d8ccdf4ef714a9612e0762c05a767 (diff)
downloadFreeBSD-src-be09e32551bb460dec857b40cbb7ca630bafddf4.zip
FreeBSD-src-be09e32551bb460dec857b40cbb7ca630bafddf4.tar.gz
Show the bzero() bandwidth in kBps instead of Bps; use u_int32_t instead
of long and int64_t; and print the result as an unsigned long. This should make the output from the bzero() test more readable, and avoid printing a negative bandwidth. Note that this doesn't change the decision process, since that is based on time elapsed, not on computed bandwidth.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/fpu.c6
-rw-r--r--sys/amd64/isa/npx.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index 87d274b..2856123 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -898,7 +898,7 @@ timezero(funcname, func)
{
void *buf;
-#define BUFSIZE 1000000
+#define BUFSIZE 1048576
long usec;
struct timeval finish, start;
@@ -913,8 +913,8 @@ timezero(funcname, func)
if (usec <= 0)
usec = 1;
if (bootverbose)
- printf("%s bandwidth = %ld bytes/sec\n",
- funcname, (long)(BUFSIZE * (int64_t)1000000 / usec));
+ printf("%s bandwidth = %lu kBps\n", funcname,
+ (u_int32_t)(((BUFSIZE >> 10) * 1000000) / usec));
free(buf, M_TEMP);
return (usec);
}
diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c
index 87d274b..2856123 100644
--- a/sys/amd64/isa/npx.c
+++ b/sys/amd64/isa/npx.c
@@ -898,7 +898,7 @@ timezero(funcname, func)
{
void *buf;
-#define BUFSIZE 1000000
+#define BUFSIZE 1048576
long usec;
struct timeval finish, start;
@@ -913,8 +913,8 @@ timezero(funcname, func)
if (usec <= 0)
usec = 1;
if (bootverbose)
- printf("%s bandwidth = %ld bytes/sec\n",
- funcname, (long)(BUFSIZE * (int64_t)1000000 / usec));
+ printf("%s bandwidth = %lu kBps\n", funcname,
+ (u_int32_t)(((BUFSIZE >> 10) * 1000000) / usec));
free(buf, M_TEMP);
return (usec);
}
OpenPOWER on IntegriCloud