[XRay] Update FDR log reader to be aware of buffer sizes per thread.
authorDean Michael Berris <dberris@google.com>
Wed, 29 Mar 2017 06:10:12 +0000 (06:10 +0000)
committerDean Michael Berris <dberris@google.com>
Wed, 29 Mar 2017 06:10:12 +0000 (06:10 +0000)
commit60c24878748987d193c91a863a3dc822ee664afc
tree1df3ea64c342225c3f26cf0f9e2c7c39a976f013
parent9b57ca171dd05043ddca0e3d15fb9fc1a692144f
[XRay] Update FDR log reader to be aware of buffer sizes per thread.

Summary:
It is problematic for this reader that it expects to read data from
several threads, but the header or message format does not define
framing. Since the buffers are reused, we can't rely on skipping
zeroed out data as a synchronization method either.

There is an argument that this is not version compatible with the format
the reader expected previously. I argue that since the writer wrote garbage
past the end of buffer record, there is no currently working reader to
compromise.

The corresponding writer change is posted to D31384.

Reviewers: dberris, pelikan

Reviewed By: dberris

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D31385

llvm-svn: 298983
llvm/include/llvm/XRay/XRayRecord.h
llvm/lib/XRay/Trace.cpp
llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-version-1.xray