public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagerm.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>,  Doug Evans <dje@google.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	 binutils <binutils@sourceware.org>
Subject: Re: [PATCH] Support gzip compressed exec and core files in gdb
Date: Thu, 12 Mar 2015 15:24:00 -0000	[thread overview]
Message-ID: <5501AFAB.2000106@eagerm.com> (raw)
In-Reply-To: <20150312045436.GA31225@host1.jankratochvil.net>

On 03/11/15 21:54, Jan Kratochvil wrote:
> On Thu, 12 Mar 2015 00:14:21 +0100, Doug Evans wrote:
>> On Wed, Mar 11, 2015 at 3:13 PM, Jan Kratochvil
>> <jan.kratochvil@redhat.com> wrote:
>>> ISTM libz-gzip and liblzma-xz compatibility is mutually exclusive.
>>
>> Can you elaborate?
>
> That gzip decompression can be done by libz but libz cannot decompress xz.
>
> The xz decompression can be done by liblzma but liblzma cannot decompress
> gzip.
>
> Therefore supporting both gzip and xz formats needs two functions / two
> libraries / two APIs support in GDB.

A different decompression library is needed for each compression type.
Adding another decompression method would be simple.

> Then I do not understand why to support gzip in the first place.

We have exec and core files which are compressed with gzip.

One testfile
> does not represent all testcases but what I randomly tried now:
>
> uncompressed : 342549479
> gzip -9      :  26053431  0m14.839s
> xz   -9  -T32:  15135468  0m13.415s (--block-size=10000000)
> xz   -9e -T32:  12825220  0m38.119s (--block-size=10000000)
> xz   -1      :  18114936  0m 8.495s
> xz   -2      :  17632160  0m12.248s
> xz   -9      :  15490372  3m13.554s
> xz   -9e     :  12606128 18m35.478s

This is not a comparison of compression methods.  For that you
can do an online search.  This is a patch to support gzipped
exec and core files.

> gzip is irrelevant, xz is about twice size or time better by every metric one
> can find.

Actually, this statement is irrelevant.  This is a patch to support the
gzipped files which we have, not files which use some other method which
we do not have.

>> support for an on-demand block-compression scheme would be significantly
>> different.  Decompressing an xz file by making a copy (as is done for gzip)
>> would be a simple extension to the current patch.
>
> The on-demand block decompression would bring a new functionality, the whole
> file decompression is one command saving convenience function.
>
> I do not plan to implement it, just if you aware of both the xz and block
> decompression advantages.

I'm certainly aware of different compression methods.  This patch brings
new functionality to gdb.  The patch has a framework which can be extended
to support other methods, if and when someone is interested in implementing it.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

  reply	other threads:[~2015-03-12 15:24 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 23:01 Michael Eager
2015-03-11  2:37 ` Mike Frysinger
2015-03-11 15:00   ` Michael Eager
2015-03-11  8:15 ` Alan Modra
2015-03-11 14:57   ` Michael Eager
2015-03-12  0:08     ` Alan Modra
2015-03-12  0:45       ` Michael Eager
2015-03-12  2:51         ` Alan Modra
2015-03-12 16:14           ` Michael Eager
2015-03-13  0:13             ` Alan Modra
2015-03-11 10:07 ` Gary Benson
2015-03-11 14:58   ` Michael Eager
2015-03-11 17:42     ` Gary Benson
2015-03-11 18:10       ` Doug Evans
2015-03-11 18:32         ` Gary Benson
2015-03-11 18:56           ` Doug Evans
2015-03-11 16:15 ` Eli Zaretskii
2015-03-11 19:55   ` Michael Eager
2015-03-11 20:18     ` Mike Frysinger
2015-03-11 20:24     ` Eli Zaretskii
2015-03-12 21:17       ` Sergio Durigan Junior
2015-03-13  6:04         ` Eli Zaretskii
2015-03-11 18:24 ` Cary Coutant
2015-03-11 20:12   ` Michael Eager
2015-03-11 20:19     ` Doug Evans
2015-03-11 22:13 ` Jan Kratochvil
2015-03-11 23:14   ` Doug Evans
2015-03-12 11:32     ` Jan Kratochvil
2015-03-12 15:24       ` Michael Eager [this message]
2015-03-12  0:40   ` Michael Eager
2015-03-12 11:31     ` Pedro Alves
2015-03-12 15:34       ` Michael Eager
2015-03-12 16:13         ` Pedro Alves
2015-03-12 16:58           ` Michael Eager
2015-03-12 17:11             ` Jan Kratochvil
2015-03-12 17:37               ` Michael Eager
2015-03-12 17:48                 ` Jan Kratochvil
2015-03-13  6:25               ` Ed Maste
2015-03-19  0:58 ` Michael Eager
2015-03-19  3:45   ` Eli Zaretskii
2015-03-20 22:16   ` Mike Frysinger
2015-03-27 15:26     ` Michael Eager
2015-03-28  4:49       ` Mike Frysinger
2015-03-28 16:56       ` Michael Eager
2015-04-01 12:41         ` Pedro Alves
2015-04-01 18:52           ` Michael Eager
2015-04-01 19:10             ` Pedro Alves
2015-05-01 14:40 ` Michael Eager
2015-05-01 17:53   ` Eli Zaretskii
2015-05-01 22:03     ` Michael Eager
2015-05-04  7:50       ` Mike Frysinger
2015-06-15 15:14         ` Michael Eager

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=5501AFAB.2000106@eagerm.com \
    --to=eager@eagerm.com \
    --cc=binutils@sourceware.org \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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).