[PATCH] D53920: [XRay] Add CPU ID in Custom Event FDR Records
Dean Michael Berris via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 31 17:21:16 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT345798: [XRay] Add CPU ID in Custom Event FDR Records (authored by dberris, committed by ).
Herald added a subscriber: Sanitizers.
Changed prior to commit:
https://reviews.llvm.org/D53920?vs=171865&id=172059#toc
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D53920
Files:
lib/xray/xray_fdr_controller.h
lib/xray/xray_fdr_log_writer.h
lib/xray/xray_fdr_logging.cc
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
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<MetadataRecord::RecordKinds::CustomEventMarker>(EventSize,
- TSC);
+ TSC, CPU);
internal_memcpy(NextRecord, Event, EventSize);
NextRecord += EventSize;
atomic_fetch_add(&Buffer.Extents, EventSize, memory_order_acq_rel);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53920.172059.patch
Type: text/x-patch
Size: 1833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/fa2127c6/attachment.bin>
More information about the llvm-commits
mailing list