From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116959 invoked by alias); 21 Sep 2018 16:37:16 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 116938 invoked by uid 89); 21 Sep 2018 16:37:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy= X-HELO: mtaout004-public.msg.strl.va.charter.net Received: from mtaout004-public.msg.strl.va.charter.net (HELO mtaout004-public.msg.strl.va.charter.net) (68.114.190.29) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Sep 2018 16:37:05 +0000 Received: from impout004 ([68.114.189.19]) by mtaout004.msg.strl.va.charter.net (InterMail vM.9.00.023.01 201-2473-194) with ESMTP id <20180921163703.ZKMT3685.mtaout004.msg.strl.va.charter.net@impout004>; Fri, 21 Sep 2018 11:37:03 -0500 Received: from [192.168.1.6] ([96.41.213.35]) by impout004 with charter.net id eGd21y00P0mPCJg01Gd3EY; Fri, 21 Sep 2018 11:37:03 -0500 X-Auth-id: anZkZWxpc2xlQGNoYXJ0ZXIubmV0 Subject: Re: [PATCH] Use vectored writes when reporting errors and warnings. To: Janne Blomqvist , Fortran List , GCC Patches References: <20180912191733.24547-1-blomqvist.janne@gmail.com> From: Jerry DeLisle Message-ID: <89a4724d-746e-5ca6-f3b2-f94dcf167ca0@charter.net> Date: Fri, 21 Sep 2018 16:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00157.txt.bz2 Janne, this looks OK. Since you are touching on configuration and posix dependencies have you tested under any other systems? Jerry On 9/21/18 1:41 AM, Janne Blomqvist wrote: > PING > > On Wed, Sep 12, 2018 at 10:17 PM Janne Blomqvist > wrote: > >> When producing error and warning messages, libgfortran writes a >> message by using many system calls. By using vectored writes (the >> POSIX writev function) when available and feasible to use without >> major surgery, we reduce the chance that output gets intermingled with >> other output to stderr. >> >> In practice, this is done by introducing a new function estr_writev in >> addition to the existing estr_write. In order to use this, the old >> st_vprintf is removed, replaced by direct calls of vsnprintf, allowing >> more message batching. >> >> Regtested on x86_64-pc-linux-gnu, Ok for trunk? >> >> libgfortran/ChangeLog: >> >> 2018-09-12 Janne Blomqvist >> >> * config.h.in: Regenerated. >> * configure: Regenerated. >> * configure.ac: Check for writev and sys/uio.h. >> * libgfortran.h: Include sys/uio.h. >> (st_vprintf): Remove prototype. >> (struct iovec): Define if not available. >> (estr_writev): New prototype. >> * runtime/backtrace.c (error_callback): Use estr_writev. >> * runtime/error.c (ST_VPRINTF_SIZE): Remove. >> (estr_writev): New function. >> (st_vprintf): Remove. >> (gf_vsnprintf): New function. >> (ST_ERRBUF_SIZE): New macro. >> (st_printf): Use vsnprintf. >> (os_error): Use estr_writev. >> (runtime_error): Use vsnprintf and estr_writev. >> (runtime_error_at): Likewise. >> (runtime_warning_at): Likewise. >> (internal_error): Use estr_writev. >> (generate_error_common): Likewise. >> (generate_warning): Likewise. >> (notify_std): Likewise. >> * runtime/pause.c (pause_string): Likewise. >> * runtime/stop.c (report_exception): Likewise. >> (stop_string): Likewise. >> (error_stop_string): Likewise. --- snip ---