I replied to the original email just a minute ago saying basically what
you're saying, but it seems to have gotten lost. What we intercept is
actually fstat, I'm pretty sure. libc tries to determine what to do
based on fstat, and if it can't then it falls back to using ioctl.
Steve Reinhardt wrote:
For the record, there was a time when we tried to intercept the
ioctl() that checked whether you were connected to a tty or not and
always indicate a tty without asking the host. This gave you
repeatable results. I'm not sure what happened to that though...
could be it's still there in the Tru64 code but never got ported to
Linux. It's also possible (though less likely) that it used to work
for Linux but a newer version of libc uses a different syscall to check.
Steve
On Thu, Apr 17, 2008 at 6:56 PM, Steve Reinhardt <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Yea, this is a long-standing issue for any system that does
syscall emulation. At runtime, the I/O library checks the output
device to see if it's line-buffered or block buffered (i.e., a tty
or not), and that affects whether or not it flushes the output
buffer on a newline. Since SE mode just passes the syscalls
through to the underlying host, the target's I/O library can tell
whether the output is being sent to the tty or to a pipe, and the
code path will change slightly depending on that.
Ideally for real simulations you'd always redirect the target's
I/O to a file and then you'll get consistent results.
Steve
On Thu, Apr 17, 2008 at 6:41 PM, Nicolas Zea
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
I've noticed that the final trace time in a normal run:
build/ALPHA_SE/m5.opt configs/example/se.py -c
tests/test-progs/hello/bin/alpha/linux/hello
and a run that pipes the results to a file
build/ALPHA_SE/m5.opt configs/example/se.py -c
tests/test-progs/hello/bin/alpha/linux/hello | tee hello_output
have different cycle times. In the case of an unmodified
m5_b5, they are 3208500 and 2871500 respectively. Any idea
what may cause this difference? (or does this not happen for
you, in which case something very odd is going on on my end)
-Nick_______________________________________________
m5-users mailing list
[email protected] <mailto:[email protected]>
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
------------------------------------------------------------------------
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users