public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/5457: Writing to buffer stream writes each byte using a system write() call.
@ 2002-01-22 15:53 paolo
0 siblings, 0 replies; 4+ messages in thread
From: paolo @ 2002-01-22 15:53 UTC (permalink / raw)
To: emaros, gcc-bugs, gcc-prs, paolo
Synopsis: Writing to buffer stream writes each byte using a system write() call.
State-Changed-From-To: feedback->closed
State-Changed-By: paolo
State-Changed-When: Tue Jan 22 15:53:40 2002
State-Changed-Why:
Fine. I'm closing this.
Cheers, Paolo.
P.S. Good catch!
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5457
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/5457: Writing to buffer stream writes each byte using a system write() call.
@ 2002-01-22 15:46 Edward Maros
0 siblings, 0 replies; 4+ messages in thread
From: Edward Maros @ 2002-01-22 15:46 UTC (permalink / raw)
To: paolo; +Cc: gcc-prs
The following reply was made to PR libstdc++/5457; it has been noted by GNATS.
From: Edward Maros <emaros@ligo.caltech.edu>
To: paolo@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: libstdc++/5457: Writing to buffer stream writes each byte using a
system write() call.
Date: Tue, 22 Jan 2002 15:28:06 -0800
paolo@gcc.gnu.org wrote:
> Synopsis: Writing to buffer stream writes each byte using a system write() call.
>
> Responsible-Changed-From-To: unassigned->paolo
> Responsible-Changed-By: paolo
> Responsible-Changed-When: Tue Jan 22 14:01:13 2002
> Responsible-Changed-Why:
> Analyzed
> State-Changed-From-To: open->feedback
> State-Changed-By: paolo
> State-Changed-When: Tue Jan 22 14:01:13 2002
> State-Changed-Why:
> Could you please check if your applications benefit from
> calling:
>
> std::ios::sync_with_stdio(false);
>
> before any I/O operation??
>
> Thanks,
> Paolo.
>
> P.S. For some details on this, see, f.i., Josuttis, pp. 682.
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5457
This does address my issue. Thank you for your help.
Ed
--
------
Edward Maros emaros@ligo.caltech.edu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/5457: Writing to buffer stream writes each byte using a system write() call.
@ 2002-01-22 14:01 paolo
0 siblings, 0 replies; 4+ messages in thread
From: paolo @ 2002-01-22 14:01 UTC (permalink / raw)
To: emaros, gcc-bugs, gcc-prs, nobody, paolo
Synopsis: Writing to buffer stream writes each byte using a system write() call.
Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Tue Jan 22 14:01:13 2002
Responsible-Changed-Why:
Analyzed
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Tue Jan 22 14:01:13 2002
State-Changed-Why:
Could you please check if your applications benefit from
calling:
std::ios::sync_with_stdio(false);
before any I/O operation??
Thanks,
Paolo.
P.S. For some details on this, see, f.i., Josuttis, pp. 682.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5457
^ permalink raw reply [flat|nested] 4+ messages in thread
* libstdc++/5457: Writing to buffer stream writes each byte using a system write() call.
@ 2002-01-22 13:46 emaros
0 siblings, 0 replies; 4+ messages in thread
From: emaros @ 2002-01-22 13:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 5457
>Category: libstdc++
>Synopsis: Writing to buffer stream writes each byte using a system write() call.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Tue Jan 22 13:46:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: emaros@ligo.caltech.edu
>Release: gcc-3.0.3
>Organization:
>Environment:
RedHat 7.2 Linux/Intel
Reading specs from /ldcg/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/specs
Configured with: ../configure --prefix=/ldcg --with-prefix=/ldcg --enable-long-long
Thread model: single
gcc version 3.0.3
>Description:
When writing to cout, each character is being written via
the system write() call.Ouput of strace:
...
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 7), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40206000
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "H", 1H) = 1
write(1, "e", 1e) = 1
write(1, "l", 1l) = 1
write(1, "l", 1l) = 1
write(1, "o", 1o) = 1
write(1, " ", 1 ) = 1
write(1, "W", 1W) = 1
write(1, "o", 1o) = 1
write(1, "r", 1r) = 1
write(1, "l", 1l) = 1
write(1, "d", 1d) = 1
write(1, "!", 1!) = 1
write(1, "\n", 1
) = 1
munmap(0x40206000, 4096) = 0
_exit(0) = ?
>How-To-Repeat:
g++ t.cc
strace ./a.out
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="t.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t.cc"
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50Cm1haW4oKQp7CglzdGQ6OmNvdXQgPDwgIkhlbGxvIFdv
cmxkISIgPDwgc3RkOjplbmRsOwp9Cg==
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-01-22 23:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-22 15:53 libstdc++/5457: Writing to buffer stream writes each byte using a system write() call paolo
-- strict thread matches above, loose matches on Subject: below --
2002-01-22 15:46 Edward Maros
2002-01-22 14:01 paolo
2002-01-22 13:46 emaros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).