Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 865d9b5

Browse files
committed
[XRAY] [compiler-rt] [NFC] Fixing the bit twiddling of Function Id in FDR logging mode.
Summary: Fixing a bug I found when testing a reader for the FDR format. Function ID is now correctly packed into the 28 bits which are documented for it instead of being masked to all ones. Reviewers: dberris, pelikan, eugenis Reviewed By: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29698 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294563 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent c26b748 commit 865d9b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/xray/xray_fdr_logging.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ void fdrLoggingHandleArg0(int32_t FuncId,
459459
FuncRecord.Type = RecordType::Function;
460460

461461
// Only get the lower 28 bits of the function id.
462-
FuncRecord.FuncId = FuncId | ~(0x03 << 28);
462+
FuncRecord.FuncId = FuncId & ~(0x0F << 28);
463463

464464
// Here we compute the TSC Delta. There are a few interesting situations we
465465
// need to account for:

0 commit comments

Comments
 (0)