Status: New
Owner: ----
New issue 2600 by [email protected]: POSIX output buffering breaks
--trace-gc when stdout is not a terminal
http://code.google.com/p/v8/issues/detail?id=2600
On POSIX, one semantic difference between a pipe and a terminal stdout is
that the pipe is, by default, buffered whereas the terminal is not (e.g.,
the terminal is line-buffered, the pipe is fully buffered). This causes
weirdness when you invoke v8 with the `--trace-gc` flag with the intent of
piping it to a log file.
e.g., if you invoke
node --trace-gc app.js > logfile 2>&1
You'll get output collated very differently from when it's invoked without
the output redirection.
I have two approaches to fixing this --
(1) fflush(stdout) after the call to vprint in OS::VPrint
(2) unconditionally set stdout to use line buffering during POSIXPostSetup
While reducing output buffering does have performance implications, I
believe OS::*Print* is only used for trace messages, so it shouldn't impact
production performance (note: I have not consulted a callgraph to verify
this).
Attachments:
1-fflush.diff 320 bytes
2-setlinebuf.diff 397 bytes
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.