[PATCH] D26040: [CodeView] Add CodeViewRecordIO for reading and writing, and use it for reading type records.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 17:55:49 PDT 2016


It's only similar to YamlIO in API.

At the low level, it's exactly the same as what we've always been doing,
it's just packaged behind an api that lets reading and writing use the same
codepath.

The CodeViewRecordIO class is backed by a StreamReader or StreamWriter,
which is itself backed anything that implements StreamInterface. So the
performance should be the same as that of whatever type of Stream you're
usin.

If you've got a MappedBlockStream, it will transparently seek around to the
different blocks and read them as needed. If you've got a ByteStream, it
just increments a pointer each time you read.

The only additional overhead here is a few virtual function indirections,
but the size of the file should be irrelevant (at least compared to before
this patch).

If we have trouble with large files, the fix would be to improve
MappedBlockStream to page in data as necessary so we don't have to map in
unused memory.

Tl;dr - this abstraction should be negligible overhead

On Thu, Oct 27, 2016 at 5:40 PM Rui Ueyama <ruiu at google.com> wrote:

> ruiu added a comment.
>
> How much is this similar to YamlIO? From my experience, I have to say that
> YamlIO is extremely slow when we give a fairly large (but not that large,
> like a few megabytes) data. I wonder if this is fast enough to handle
> hundreds of megabytes of debug info.
>
>
> https://reviews.llvm.org/D26040
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161028/755f9754/attachment.html>


More information about the llvm-commits mailing list