public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: Richard Guenther <richard.guenther@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: Better location streaming
Date: Thu, 26 May 2011 11:24:00 -0000	[thread overview]
Message-ID: <20110526105328.GA10483@kam.mff.cuni.cz> (raw)
In-Reply-To: <20110526104542.GB14465@atrey.karlin.mff.cuni.cz>

> > 
> > This looks all very hackish with no immediate benefit mostly because
> > of the use of lto_output_string.  I think what you should do instead
> > is split up lto_output_string_with_length into the piece that streams
> > the string itself to the string-stream and returns an index into it
> > and the piece streaming the index to the specified stream.  Then you
> > can simply bitpack that index and the two int line / column fields.
> 
> Hmm, I plan to optimize string streaming (since we always stream one uleb to
> set it is non-NULL that can be easilly handled by assigining NULL string index
> 0).  How precisely you however suggest to bitpack line/column and string offset
> together?
> 
> The point is to make location info occupy not even whole byte most of time.
> Adding a simple stats claims that for tramp3d 30% of time location is
> undefined, 15% of time file changes, 39% of time line changes and 44% of time
> column changes (on tramp3d).  So assuming one byte for each uleb (that is
> optimistic, of course) one need 4 bits for the changed flags + less than a byte
> for the data.  Situation is similar for combine.c where unknown id 10%, file
> change is 0.5% and line change is 30%.

Note that for tramp3d the function sections reduce in size by about 16%, decl
section by about 10%. So there is some immediate benefit.

Honza

  reply	other threads:[~2011-05-26 10:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 10:48 Jan Hubicka
2011-05-26 10:53 ` Richard Guenther
2011-05-26 11:12   ` Jan Hubicka
2011-05-26 11:24     ` Jan Hubicka [this message]
2011-05-26 11:29     ` Richard Guenther
2011-05-26 12:31       ` Jan Hubicka
2011-05-26 12:40         ` Richard Guenther
2011-05-26 12:51           ` Jan Hubicka
2011-05-26 13:20             ` Richard Guenther
2011-05-26 16:49       ` Michael Matz
2011-05-27 12:06         ` Jan Hubicka
2011-05-27 12:35           ` Richard Guenther
2011-05-27 12:40             ` Jan Hubicka

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=20110526105328.GA10483@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.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).