corbbtprof: set byte alignment for CORBBTPROF structures (#25816)
[platform/upstream/coreclr.git] / src / inc / corbbtprof.h
index 2f69dcc..419a7f0 100644 (file)
@@ -140,7 +140,7 @@ enum TypeProfilingDataFlags
     ReadMethodTable               = 0,  // 0x00001
     ReadEEClass                   = 1,  // 0x00002
     WriteEEClass                  = 2,  // 0x00004
-//  ReadStoredEnumData            = 3,  // 0x00008
+//  ReadStoredEnumData            = 3,  // 0x00008  // obsolete
     ReadFieldDescs                = 4,  // 0x00010
     ReadCCtorInfo                 = 5,  // 0x00020
     ReadClassHashTable            = 6,  // 0x00040
@@ -148,34 +148,37 @@ enum TypeProfilingDataFlags
     ReadDispatchTable             = 8,  // 0x00100
     ReadMethodTableWriteableData  = 9,  // 0x00200
     ReadFieldMarshalers           = 10, // 0x00400
-//  Unused                        = 11, // 0x00800 ... Was WriteDispatchTable in the past
-//  WriteMethodTable              = 12, // 0x01000
+//  WriteDispatchTable            = 11, // 0x00800  // obsolete
+//  WriteMethodTable              = 12, // 0x01000  // obsolete
     WriteMethodTableWriteableData = 13, // 0x02000
     ReadTypeDesc                  = 14, // 0x04000
     WriteTypeDesc                 = 15, // 0x08000
     ReadTypeHashTable             = 16, // 0x10000
-//  WriteTypeHashTable            = 17, // 0x20000
-//  ReadDictionary                = 18, // 0x40000
-//  WriteDictionary               = 19, // 0x80000
+//  WriteTypeHashTable            = 17, // 0x20000  // obsolete
+//  ReadDictionary                = 18, // 0x40000  // obsolete
+//  WriteDictionary               = 19, // 0x80000  // obsolete
     ReadNonVirtualSlots           = 20, // 0x100000
 };
 
 enum MethodProfilingDataFlags
 {
     // Important: update toolbox\ibcmerge\ibcmerge.cs if you change these
-    ReadMethodCode                = 0,  // 0x00001
+    ReadMethodCode                = 0,  // 0x00001  // Also means the method was executed
     ReadMethodDesc                = 1,  // 0x00002
-    RunOnceMethod                 = 2,  // 0x00004  // was CommonMethod
-    RunNeverMethod                = 3,  // 0x00008  // was MethodMetadataAccess
-//  MethodStoredDataAccess        = 4,  // 0x00010
+    RunOnceMethod                 = 2,  // 0x00004
+    RunNeverMethod                = 3,  // 0x00008
+//  MethodStoredDataAccess        = 4,  // 0x00010  // obsolete
     WriteMethodDesc               = 5,  // 0x00020
-//  ReadFCallHash                 = 6,  // 0x00040
+//  ReadFCallHash                 = 6,  // 0x00040  // obsolete
     ReadGCInfo                    = 7,  // 0x00080
     CommonReadGCInfo              = 8,  // 0x00100
-//  ReadMethodDefRidMap           = 9,  // 0x00200
+//  ReadMethodDefRidMap           = 9,  // 0x00200  // obsolete
     ReadCerMethodList             = 10, // 0x00400
     ReadMethodPrecode             = 11, // 0x00800
     WriteMethodPrecode            = 12, // 0x01000
+    ExcludeHotMethodCode          = 13, // 0x02000  // Hot method should be excluded from the ReadyToRun image
+    ExcludeColdMethodCode         = 14, // 0x04000  // Cold method should be excluded from the ReadyToRun image
+    DisableInlining               = 15, // 0x08000  // Disable inlining of this method in optimized AOT native code
 };
 
 enum GeneralProfilingDataFlags
@@ -272,6 +275,8 @@ enum SectionFormat
     SectionFormatInvalid                = -1
 };
 
+#include <pshpack1.h>
+
 struct CORBBTPROF_SECTION_TABLE_ENTRY
 {
     SectionFormat                  FormatID;
@@ -399,10 +404,10 @@ struct CORBBTPROF_METHOD_BLOCK_COUNTS_SECTION_HEADER
     DWORD                          NumMethods;
 };
 
-struct CORBBTPROF_BLOCK_DATA    // Also defined here code:ICorJitInfo.ProfileBuffer
+struct CORBBTPROF_BLOCK_DATA    // This struct is also defined by:  ICorJitInfo.BlockCounts
 {
-    DWORD                          ILOffset;
-    DWORD                          ExecutionCount;
+    UINT32                         ILOffset;
+    UINT32                         ExecutionCount;
 };
 
 struct CORBBTPROF_METHOD_DETAIL_HEADER
@@ -586,4 +591,7 @@ struct CORBBTPROF_BLOB_POOL_ENTRY
     DWORD                  cBuffer;
     BYTE                   buffer[0];  // actually 'cBuffer' in length
 };
+
+#include <poppack.h>
+
 #endif /* COR_BBTPROF_H_ */