[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)
Jan Patrick Lehr via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 12:26:01 PDT 2024
================
@@ -50,14 +52,72 @@ atomic_uint8_t XRayInitialized{0};
// This should always be updated before XRayInitialized is updated.
SpinMutex XRayInstrMapMutex;
-XRaySledMap XRayInstrMap;
+// XRaySledMap XRayInstrMap;
+// Contains maps for the main executable as well as DSOs.
+// std::vector<XRaySledMap> XRayInstrMaps;
+XRaySledMap *XRayInstrMaps;
+atomic_uint32_t XRayNumObjects;
// Global flag to determine whether the flags have been initialized.
atomic_uint8_t XRayFlagsInitialized{0};
// A mutex to allow only one thread to initialize the XRay data structures.
SpinMutex XRayInitMutex;
+int32_t
+__xray_register_sleds(const XRaySledEntry *SledsBegin,
+ const XRaySledEntry *SledsEnd,
+ const XRayFunctionSledIndex *FnIndexBegin,
+ const XRayFunctionSledIndex *FnIndexEnd, bool FromDSO,
+ XRayTrampolines Trampolines) XRAY_NEVER_INSTRUMENT {
+ if (!SledsBegin || !SledsEnd) {
----------------
jplehr wrote:
No curly here
https://github.com/llvm/llvm-project/pull/90959
More information about the cfe-commits
mailing list