Merge pull request #1665 from alexanderkyte/sgen-alloc-assert
[mono.git] / mono / profiler / proflog.h
index 5011eab9a44d178387fc94315f624a2c45b63ad8..3ea6a8d23822c82e70aeb50506628832e113099f 100644 (file)
@@ -4,11 +4,16 @@
 #define BUF_ID 0x4D504C01
 #define LOG_HEADER_ID 0x4D505A01
 #define LOG_VERSION_MAJOR 0
-#define LOG_VERSION_MINOR 2
-#define LOG_DATA_VERSION 3
+#define LOG_VERSION_MINOR 4
+#define LOG_DATA_VERSION 8
 /*
+ * Changes in data versions:
  * version 2: added offsets in heap walk
  * version 3: added GC roots
+ * version 4: added sample/statistical profiling
+ * version 5: added counters sampling
+ * version 6: added optional backtrace in sampling info
+ * version 8: added TYPE_RUNTIME and JIT helpers/trampolines
  */
 
 enum {
@@ -19,7 +24,8 @@ enum {
        TYPE_EXCEPTION,
        TYPE_MONITOR,
        TYPE_HEAP,
-       TYPE_EXTENDED,
+       TYPE_SAMPLE,
+       TYPE_RUNTIME,
        /* extended type for TYPE_HEAP */
        TYPE_HEAP_START  = 0 << 4,
        TYPE_HEAP_END    = 1 << 4,
@@ -55,8 +61,26 @@ enum {
        TYPE_ALLOC_BT  = 1 << 4,
        /* extended type for TYPE_MONITOR */
        TYPE_MONITOR_BT  = 1 << 7,
+       /* extended type for TYPE_SAMPLE */
+       TYPE_SAMPLE_HIT           = 0 << 4,
+       TYPE_SAMPLE_USYM          = 1 << 4,
+       TYPE_SAMPLE_UBIN          = 2 << 4,
+       TYPE_SAMPLE_COUNTERS_DESC = 3 << 4,
+       TYPE_SAMPLE_COUNTERS      = 4 << 4,
+       /* extended type for TYPE_RUNTIME */
+       TYPE_JITHELPER = 1 << 4,
        TYPE_END
 };
 
+enum {
+       SAMPLE_CYCLES = 1,
+       SAMPLE_INSTRUCTIONS,
+       SAMPLE_CACHE_MISSES,
+       SAMPLE_CACHE_REFS,
+       SAMPLE_BRANCHES,
+       SAMPLE_BRANCH_MISSES,
+       SAMPLE_LAST
+};
+
 #endif /* __MONO_PROFLOG_H__ */