[llvm] 3826a74 - [NFC][xray] Initialize XRayFileHeader

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 22:58:46 PDT 2023


Author: Vitaly Buka
Date: 2023-05-11T22:58:09-07:00
New Revision: 3826a74fc7ad589e268b267d9323d4d416c5f6e9

URL: https://github.com/llvm/llvm-project/commit/3826a74fc7ad589e268b267d9323d4d416c5f6e9
DIFF: https://github.com/llvm/llvm-project/commit/3826a74fc7ad589e268b267d9323d4d416c5f6e9.diff

LOG: [NFC][xray] Initialize XRayFileHeader

Avoids reports with msan -fno-inline.

Added: 
    

Modified: 
    llvm/include/llvm/XRay/XRayRecord.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/XRay/XRayRecord.h b/llvm/include/llvm/XRay/XRayRecord.h
index bb3c346d05e7..238bf3daf6ea 100644
--- a/llvm/include/llvm/XRay/XRayRecord.h
+++ b/llvm/include/llvm/XRay/XRayRecord.h
@@ -34,10 +34,10 @@ struct XRayFileHeader {
 
   /// Whether the CPU that produced the timestamp counters (TSC) move at a
   /// constant rate.
-  bool ConstantTSC;
+  bool ConstantTSC = false;
 
   /// Whether the CPU that produced the timestamp counters (TSC) do not stop.
-  bool NonstopTSC;
+  bool NonstopTSC = false;
 
   /// The number of cycles per second for the CPU that produced the timestamp
   /// counter (TSC) values. Useful for estimating the amount of time that
@@ -47,7 +47,7 @@ struct XRayFileHeader {
   // This is 
diff erent depending on the type of xray record. The naive format
   // stores a Wallclock timespec. FDR logging stores the size of a thread
   // buffer.
-  char FreeFormData[16];
+  char FreeFormData[16] = {};
 };
 
 /// Determines the supported types of records that could be seen in XRay traces.


        


More information about the llvm-commits mailing list