Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: csilvers@google.com (Craig Silverstein)
To: drow@false.org
Cc: bauerman@br.ibm.com, gdb-patches@sourceware.org
Subject: Re: Patch to handle compressed sections
Date: Wed, 26 Mar 2008 18:36:00 -0000	[thread overview]
Message-ID: <20080326183538.346243F25E8@localhost> (raw)
In-Reply-To: <20080326180132.GB10127@caradoc.them.org> (message from Daniel 	Jacobowitz on Wed, 26 Mar 2008 14:01:32 -0400)

} Or in the beginning of .debug_info.zlib?  (.zdebug_info?)

I thought of that too, but again I didn't see much benefit.  On the
other hand, there is a cost (albeit small): now you have a "format"
for compressed data, with a header section and data to follow, so you
need to codify and document the header format, and deal with issues
like 4-byte vs 8-byte and endianness, and then you'll probably want a
version, and things just get very complicated.  I like the simplicity
of saying the section is just a blob of compressed data.

I feel if we start needing more data stored with a compressed section
than just its uncompressed length, then we can move to
.debug_info.zlib and write a header format to encompass all that data,
at that time.  But it's not really necessary to do that now.  (And,
honestly, I'd like to make it difficult to go that route, since again
it adds complexity to what currently seems like a pretty simple
design.)

} I've been looking at this and wondering if block compression makes
} more sense; that would let an optimized consumer keep less than the
} whole decompressed contents in memory.

The current algorithm supports block compression -- if the section
consists of several compressed blocks appended together, it will
recognize that and correctly decompress.

It's true that right now we always decompress all the blocks when we
read a section, but one could imagine that instead we keep track of
this info on a per-block basis, and only decompress a given block at
need.  I think that would complicate the logic significantly, though,
and don't think it's warranted for this version 1.0 patch.  The
important thing, I think, is that this patch doesn't close off making
such an optimization in the future.

craig


  reply	other threads:[~2008-03-26 18:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 23:05 Craig Silverstein
2008-03-26 16:10 ` Thiago Jung Bauermann
2008-03-26 17:40   ` Craig Silverstein
2008-03-26 18:01     ` Daniel Jacobowitz
2008-03-26 18:36       ` Craig Silverstein [this message]
2008-04-01 14:28         ` Daniel Jacobowitz
2008-04-02  0:38           ` Craig Silverstein
2008-04-02 12:27             ` Daniel Jacobowitz
2008-04-02 12:51               ` Craig Silverstein
2008-04-02 14:13               ` Andreas Schwab
2008-04-03  7:38               ` Craig Silverstein
2008-04-03  8:45                 ` Craig Silverstein
2008-04-03 11:01                   ` Pedro Alves
2008-04-03 11:10                     ` Pedro Alves
2008-04-03 21:43                     ` Craig Silverstein
2008-04-04  1:28                     ` Craig Silverstein
2008-04-15  6:16                   ` Craig Silverstein
2008-04-17 16:24                     ` Daniel Jacobowitz
2008-04-17 20:57                       ` Craig Silverstein
2008-04-17 21:09                         ` Daniel Jacobowitz
2008-04-19  0:32                           ` Craig Silverstein
2008-04-19  0:13                             ` Daniel Jacobowitz
2008-04-19  0:32                               ` Daniel Jacobowitz

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=20080326183538.346243F25E8@localhost \
    --to=csilvers@google.com \
    --cc=bauerman@br.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.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