This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: hppa build broken
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Cc: sje at cup dot hp dot com, binutils at sources dot redhat dot com, amodra at bigpond dot net dot au
- Date: Wed, 15 Jun 2005 23:29:43 -0400 (EDT)
- Subject: Re: hppa build broken
> Does this help with performance on your workstation? I've checked
> that it does the right thing but it it doesn't seem to help with
> performance on my A550.
There are still problems with the algorithm. The enclosed little
test program writes junk in just over a minute:
real 1m3.716s
user 0m0.010s
sys 0m6.450s
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
#include <fcntl.h>
#include <unistd.h>
#define FRAG_SIZE (1024 * 1024)
int
main ()
{
char buf[FRAG_SIZE];
int fd, i;
fd = open ("junk", O_WRONLY|O_CREAT);
memset (buf, 0, FRAG_SIZE);
for (i = 1024; i; i--)
{
size_t cnt = FRAG_SIZE;
ssize_t n;
char *p = buf;
while (cnt)
{
n = write (fd, p, cnt);
if (n == -1)
abort ();
cnt -= n;
p += n;
}
}
}