[PATCH] D43278: Add Xray instrumentation support to FreeBSD
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 16:45:51 PST 2018
krytarowski added a comment.
// On Darwin, thread IDs are 64-bit even on 32-bit systems.
typedef u64 tid_t;
typedef uptr tid_t;
So right, Darwin uses 64-bit integer.
I don't know who needs 'uptr' for !Darwin? In my opinion this `tid_t` should be typedefed to `u64` for everybody.
This is the solution e.g. in LLDB:
In XRay `writeNewBufferPreamble()` we can temporarily cast `tid_t` to `int32_t` and document (add a comment) that this does not work for Darwin, because it uses 64-bit Thread ID.
Darwin users can improve it in future.
I will follow up with NetBSD XRay support once this will land the sources.
More information about the llvm-commits