diff options
| author | Keith Wyss <wyssman@gmail.com> | 2017-08-02 21:47:27 +0000 |
|---|---|---|
| committer | Keith Wyss <wyssman@gmail.com> | 2017-08-02 21:47:27 +0000 |
| commit | 3d0bc9ef1a9dd78815aad6e2ef1c70747a0de56c (patch) | |
| tree | 20f8f1ea7330d711714522de7b2f7eb4aad8711d /llvm/lib | |
| parent | e6de494b7442f5a725ab77bdb80aa20de5447736 (diff) | |
| download | bcm5719-llvm-3d0bc9ef1a9dd78815aad6e2ef1c70747a0de56c.tar.gz bcm5719-llvm-3d0bc9ef1a9dd78815aad6e2ef1c70747a0de56c.zip | |
Xray docs with description of Flight Data Recorder binary format.
Summary:
Adding a new restructuredText file to document the trace format produced with
an FDR mode handler and read by llvm-xray toolset.
Fixed two problems in the documentation from differential review. One bad table
and a missing link in the toc.
Original commit was e97c5836a77db803fe53319c53f3bf8e8b26d2b7.
Reviewers: dberris, pelikan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36041
llvm-svn: 309891
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/XRay/Trace.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/XRay/Trace.cpp b/llvm/lib/XRay/Trace.cpp index 6677063f944..89fd0b0748b 100644 --- a/llvm/lib/XRay/Trace.cpp +++ b/llvm/lib/XRay/Trace.cpp @@ -222,8 +222,8 @@ Error processCustomEventMarker(FDRState &State, uint8_t RecordFirstByte, DataExtractor &RecordExtractor, size_t &RecordSize) { // We can encounter a CustomEventMarker anywhere in the log, so we can handle - // it regardless of the expectation. However, we do se the expectation to read - // a set number of fixed bytes, as described in the metadata. + // it regardless of the expectation. However, we do set the expectation to + // read a set number of fixed bytes, as described in the metadata. uint32_t OffsetPtr = 1; // Read after the first byte. uint32_t DataSize = RecordExtractor.getU32(&OffsetPtr); uint64_t TSC = RecordExtractor.getU64(&OffsetPtr); @@ -333,7 +333,7 @@ Error processFDRFunctionRecord(FDRState &State, uint8_t RecordFirstByte, } Record.CPU = State.CPUId; Record.TId = State.ThreadId; - // Back up to read first 32 bits, including the 8 we pulled RecordType + // Back up to read first 32 bits, including the 4 we pulled RecordType // and RecordKind out of. The remaining 28 are FunctionId. uint32_t OffsetPtr = 0; // Despite function Id being a signed int on XRayRecord, @@ -369,8 +369,9 @@ Error processFDRFunctionRecord(FDRState &State, uint8_t RecordFirstByte, /// We expect a format complying with the grammar in the following pseudo-EBNF. /// /// FDRLog: XRayFileHeader ThreadBuffer* -/// XRayFileHeader: 32 bits to identify the log as FDR with machine metadata. -/// ThreadBuffer: BufSize NewBuffer WallClockTime NewCPUId FunctionSequence EOB +/// XRayFileHeader: 32 bytes to identify the log as FDR with machine metadata. +/// Includes BufferSize +/// ThreadBuffer: NewBuffer WallClockTime NewCPUId FunctionSequence EOB /// BufSize: 8 byte unsigned integer indicating how large the buffer is. /// NewBuffer: 16 byte metadata record with Thread Id. /// WallClockTime: 16 byte metadata record with human readable time. |

