public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jerry DeLisle <jvdelisle@charter.net>
To: Janne Blomqvist <blomqvist.janne@gmail.com>,
	Fortran List <fortran@gcc.gnu.org>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Use vectored writes when reporting errors and warnings.
Date: Fri, 21 Sep 2018 16:47:00 -0000	[thread overview]
Message-ID: <89a4724d-746e-5ca6-f3b2-f94dcf167ca0@charter.net> (raw)
In-Reply-To: <CAO9iq9HS1jCM2CRA5MUgJw7QDb4_ygqBoR7nODusRsJEAZ7C2A@mail.gmail.com>

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 <blomqvist.janne@gmail.com>
> 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  <jb@gcc.gnu.org>
>>
>>          * 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 ---

  reply	other threads:[~2018-09-21 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 19:23 Janne Blomqvist
2018-09-21  9:04 ` Janne Blomqvist
2018-09-21 16:47   ` Jerry DeLisle [this message]
2018-09-21 18:17     ` Janne Blomqvist

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=89a4724d-746e-5ca6-f3b2-f94dcf167ca0@charter.net \
    --to=jvdelisle@charter.net \
    --cc=blomqvist.janne@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).