summaryrefslogtreecommitdiff
path: root/include/xray/xray_records.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/xray/xray_records.h')
-rw-r--r--include/xray/xray_records.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/include/xray/xray_records.h b/include/xray/xray_records.h
index 71637d1fe..feb8d228b 100644
--- a/include/xray/xray_records.h
+++ b/include/xray/xray_records.h
@@ -24,6 +24,14 @@ enum FileTypes {
FDR_LOG = 1,
};
+// FDR mode use of the union field in the XRayFileHeader.
+struct alignas(16) FdrAdditionalHeaderData {
+ uint64_t ThreadBufferSize;
+};
+
+static_assert(sizeof(FdrAdditionalHeaderData) == 16,
+ "FdrAdditionalHeaderData != 16 bytes");
+
// This data structure is used to describe the contents of the file. We use this
// for versioning the supported XRay file formats.
struct alignas(32) XRayFileHeader {
@@ -42,10 +50,15 @@ struct alignas(32) XRayFileHeader {
// The frequency by which TSC increases per-second.
alignas(8) uint64_t CycleFrequency = 0;
- // The current civiltime timestamp, as retrived from 'clock_gettime'. This
- // allows readers of the file to determine when the file was created or
- // written down.
- struct timespec TS;
+ union {
+ char FreeForm[16];
+ // The current civiltime timestamp, as retrived from 'clock_gettime'. This
+ // allows readers of the file to determine when the file was created or
+ // written down.
+ struct timespec TS;
+
+ struct FdrAdditionalHeaderData FdrData;
+ };
} __attribute__((packed));
static_assert(sizeof(XRayFileHeader) == 32, "XRayFileHeader != 32 bytes");