Index: lib/xray/xray_fdr_controller.h =================================================================== --- lib/xray/xray_fdr_controller.h +++ lib/xray/xray_fdr_controller.h @@ -327,7 +327,7 @@ LatestTSC = 0; UndoableFunctionEnters = 0; UndoableTailExits = 0; - return W.writeCustomEvent(TSC, Event, EventSize); + return W.writeCustomEvent(TSC, CPU, Event, EventSize); } bool typedEvent(uint64_t TSC, uint16_t CPU, uint16_t EventType, Index: lib/xray/xray_fdr_log_writer.h =================================================================== --- lib/xray/xray_fdr_log_writer.h +++ lib/xray/xray_fdr_log_writer.h @@ -110,9 +110,10 @@ return true; } - bool writeCustomEvent(uint64_t TSC, const void *Event, int32_t EventSize) { + bool writeCustomEvent(uint64_t TSC, uint16_t CPU, const void *Event, + int32_t EventSize) { writeMetadata(EventSize, - TSC); + TSC, CPU); internal_memcpy(NextRecord, Event, EventSize); NextRecord += EventSize; atomic_fetch_add(&Buffer.Extents, EventSize, memory_order_acq_rel); Index: lib/xray/xray_fdr_logging.cc =================================================================== --- lib/xray/xray_fdr_logging.cc +++ lib/xray/xray_fdr_logging.cc @@ -148,7 +148,8 @@ // Version 2 of the log writes the extents of the buffer, instead of // relying on an end-of-buffer record. // Version 3 includes PID metadata record - H.Version = 3; + // Version 4 includes CPU data in the custom event records + H.Version = 4; H.Type = FileTypes::FDR_LOG; // Test for required CPU features and cache the cycle frequency