[PATCH] D52126: Discard uncompressed buffer after creating .gdb_index contents.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 16:14:01 PDT 2018


*nod* It might be possible to (maybe too low-level - not sure if zlib
exposes this, or if the format even allows it to be efficiently answered)
retrieve the size of a compressed section without decompressing it (at
least in zlib-gnu fromat, I think the uncompressed size is written before
the compressed data, so easy there) - that way maybe more things wouldn't
need to care about whether it was compressed or not - it could be
decompressed lazily (& then the other half would be to deallocate promptly,
as soon as those bytes were finished with/written out to the output and no
longer needed).

At some point, it'd be even great to use streaming compression in and out.
(I guess you could probably even use streaming decompression for the
pubnames - so even a whole object file's pubnames wouldn't need to be
decompressed simultaneously - just ask for the next chunk of decompressed
data, process it, then overwrite it with the next chunk, etc).

On Mon, Sep 17, 2018 at 4:08 PM Rui Ueyama via Phabricator <
reviews at reviews.llvm.org> wrote:

> ruiu added a comment.
>
> It is doable and perhaps we should do that. Currently, we decompress all
> compressed sections before doing anything, so that such sections are
> handled as if they weren't compressed at all, but sometimes that leads to a
> waste of time and memory.
>
>
> Repository:
>   rLLD LLVM Linker
>
> https://reviews.llvm.org/D52126
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180917/d25f00ed/attachment.html>


More information about the llvm-commits mailing list