[PATCH] D43278: Add Xray instrumentation support to FreeBSD
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 14:15:01 PST 2018
krytarowski added inline comments.
================
Comment at: lib/xray/xray_fdr_logging_impl.h:240
TLD.RecordPtr = static_cast<char *>(B.Data);
- pid_t Tid = syscall(SYS_gettid);
+ pid_t Tid = getTid();
timespec TS{0, 0};
----------------
krytarowski wrote:
> Here `Tid` should be of type `Tid_t`.
There are more `pid_t` out there:
```
static void writeNewBufferPreamble(pid_t Tid, timespec TS);
```
```
static void writeNewBufferPreamble(pid_t Tid,
timespec TS) XRAY_NEVER_INSTRUMENT {
```
```
// point we only write down the following bytes:
// - Thread ID (pid_t, 4 bytes)
```
https://reviews.llvm.org/D43278
More information about the llvm-commits
mailing list