From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2182 invoked by alias); 25 Aug 2013 01:08:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2167 invoked by uid 89); 25 Aug 2013 01:08:22 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.2 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 25 Aug 2013 01:08:21 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VDOoV-0005iN-Ed from Yao_Qi@mentor.com ; Sat, 24 Aug 2013 18:08:19 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 24 Aug 2013 18:08:18 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Sat, 24 Aug 2013 18:08:18 -0700 Message-ID: <521958D7.3090806@codesourcery.com> Date: Sun, 25 Aug 2013 01:08:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pierre Muller CC: Subject: Re: [RFC] Add possibility to force buffering mode for stdout/stderr References: <001201ce9e80$4b90b3e0$e2b21ba0$@muller@ics-cnrs.unistra.fr> In-Reply-To: <001201ce9e80$4b90b3e0$e2b21ba0$@muller@ics-cnrs.unistra.fr> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-08/txt/msg00720.txt.bz2 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 (齐尧)