From: Yao Qi <yao@codesourcery.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFC] Add possibility to force buffering mode for stdout/stderr
Date: Sun, 25 Aug 2013 01:08:00 -0000 [thread overview]
Message-ID: <521958D7.3090806@codesourcery.com> (raw)
In-Reply-To: <001201ce9e80$4b90b3e0$e2b21ba0$@muller@ics-cnrs.unistra.fr>
On 08/21/2013 11:08 PM, Pierre Muller wrote:
> basically adding
> "-ex {maint setvbuf stdout full 1000000}"
> or
> "-ex {maint setvbuf stdout line 80}"
> should allow to test both performance differences
> induced by buffering changes and possible regressions
> in testsuite results.
>
> This patch is really only of interest to developers
> using the testsuite or wanting to investigate
> performance issues related to buffering.
Pierre,
I am afraid we can't call setvbuf on-the-fly to adjust the buffering to
a stream.
"The setvbuf() function may be used after the stream pointed to by
stream is associated with an open file but before any other operation"
See http://pubs.opengroup.org/onlinepubs/009696699/functions/setvbuf.html
setvbuf on Windows has similar requirement.
Even this command is only used once like "-ex {maint setvbuf stdout full
1000000}" or "-iex {maint setvbuf stdout line 80}", they are executed
after GDB printed version info to stdout, so it is not right to call
setvbuf, IMO.
--
Yao (é½å°§)
next prev parent reply other threads:[~2013-08-25 1:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 15:08 Pierre Muller
2013-08-25 1:08 ` Yao Qi [this message]
[not found] <"001201ce9e80$4b90b3e0$e2b21ba0$@muller"@ics-cnrs.unistra.fr>
2013-08-21 15:51 ` Eli Zaretskii
2013-08-21 17:26 ` Pierre Muller
[not found] ` <"000f01ce9e93$88620770$99261650$@muller"@ics-cnrs.unistra.fr>
2013-08-21 17:58 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521958D7.3090806@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox