public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Zack Weinberg <zack@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: RFC Speed up dbxout.c a bit
Date: Thu, 14 Oct 2004 14:46:00 -0000	[thread overview]
Message-ID: <20041014132402.GA8948@nevyn.them.org> (raw)
In-Reply-To: <877jptn0qm.fsf@codesourcery.com>

On Thu, Oct 14, 2004 at 01:49:05AM -0700, Zack Weinberg wrote:
> 
> This patch restructures dbxout.c not to use printf under any
> circumstances.  It also overhauls the handling of continued stabs
> strings -- formerly each place that emitted part of a string would
> keep count of how many characters had been emitted, and at designated
> 'continuation points'  the line would be split if there were too
> many.  This meant that DBX_CONTIN_LENGTH had to be viewed as more of a
> guideline than an upper limit; there are several target headers which
> complain about not being able to use the correct value.  Also, this
> structure forced the subsequent parameters to the .stabs directive to
> be carried around in global variables.
> 
> Now we build the .stabs string in an obstack and break it up into
> appropriately-sized chunks when it's done.  This means that
> DBX_CONTIN_LENGTH is now accurate, and the globals go away.  Note that
> the obstack is used even when there is no limit on the length of a
> .stabs string.  This is because it would take more #ifdefs to write
> straight to stdio in that case.  Also, strange but true, writing
> straight to stdio is slower.  Yes, I profiled it.

Unfortunately this won't work.  Did you test on a target which breaks
up stab strings?  GDB (and probably other consumers) do a similar
process of only putting the string back together in certain places.
The majority of the code will fall down if you insert backslashes
arbitrarily.

I can't figure out what targets are affected, since the default is 80
rather than 0.  At least MIPS, Alpha, SPARC.

You could fix this but I'm not sure how many other programs may be
affected.

-- 
Daniel Jacobowitz

  parent reply	other threads:[~2004-10-14 13:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14  9:12 Zack Weinberg
2004-10-14  9:32 ` Richard Earnshaw
2004-10-14 16:57   ` Zack Weinberg
2004-10-14 14:46 ` Daniel Jacobowitz [this message]
2004-10-14 17:04   ` Zack Weinberg
2004-10-14 17:39     ` Daniel Jacobowitz
2004-10-14 18:48       ` Zack Weinberg
2004-10-15  2:34 ` tm_gccmail
2004-10-15 21:15 ` Mike Stump

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=20041014132402.GA8948@nevyn.them.org \
    --to=drow@false.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=zack@codesourcery.com \
    /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).