This is an archive of the discontinued LLVM Phabricator instance.

[XRay] Add a BlockIndexer visitor for FDR Records.
ClosedPublic

Authored by dberris on Sep 5 2018, 1:05 AM.

Details

Summary

This change adds a BlockIndexer type which maintains pointers to
records that belong to the same process+thread pairs. The indexing
happens with order of appearance of records as they are visited.

This version of the indexer currently only supports FDR version 3 logs,
which contain BufferExtent records. We will add support for v2 and v1
logs in follow-up patches.

This is another part of D50441.

Event Timeline

dberris created this revision.Sep 5 2018, 1:05 AM
mboerger accepted this revision.Sep 5 2018, 9:54 PM
mboerger added a reviewer: mboerger.
mboerger added a subscriber: mboerger.

LGTM

llvm/lib/XRay/BlockIndexer.cpp
74

Decide for an order and be consistent.

llvm/unittests/XRay/FDRBlockIndexerTest.cpp
65

consider SizeIs() matcher.

72

consider using just ElementsAre() matcher without the assertion first.

This revision is now accepted and ready to land.Sep 5 2018, 9:54 PM
dberris updated this revision to Diff 164146.Sep 5 2018, 10:50 PM
dberris marked 3 inline comments as done.

Address comments by @mboerger.

This revision was automatically updated to reflect the committed changes.