[profiler] Remove the type field from TYPE_SAMPLE_HIT.
[mono.git] / mono / profiler / log.h
index ee1d1d347b2c1b019eeaf1e5070bb47480f75d59..ecbe3ab219795d6d9844b219633dc30b9d93335c 100644 (file)
@@ -6,9 +6,9 @@
 
 #define BUF_ID 0x4D504C01
 #define LOG_HEADER_ID 0x4D505A01
-#define LOG_VERSION_MAJOR 1
-#define LOG_VERSION_MINOR 1
-#define LOG_DATA_VERSION 13
+#define LOG_VERSION_MAJOR 2
+#define LOG_VERSION_MINOR 0
+#define LOG_DATA_VERSION 14
 
 /*
  * Changes in major/minor versions:
                moved the time field in TYPE_SAMPLE_HIT to right after the event byte, now encoded as a regular time field
                changed the time field in TYPE_SAMPLE_COUNTERS to be encoded as a regular time field (in nanoseconds)
                added TYPE_GC_FINALIZE_{START,END,OBJECT_START,OBJECT_END}
+ * version 14: added event field to TYPE_MONITOR instead of encoding it in the extended info
+               all TYPE_MONITOR events can now contain backtraces
+               changed address field in TYPE_SAMPLE_UBIN to be based on ptr_base
+               added an image pointer field to assembly load events
+               added an exception object field to TYPE_CLAUSE
+               class unload events no longer exist (they were never emitted)
+               removed type field from TYPE_SAMPLE_HIT
  */
 
 enum {
@@ -144,19 +151,17 @@ typedef enum {
        SYNC_POINT_WORLD_START
 } MonoProfilerSyncPointType;
 
-// Sampling sources
-// Unless you have compiled with --enable-perf-events, only SAMPLE_CYCLES is available
+typedef enum {
+       MONO_PROFILER_MONITOR_CONTENTION = 1,
+       MONO_PROFILER_MONITOR_DONE = 2,
+       MONO_PROFILER_MONITOR_FAIL = 3,
+} MonoProfilerMonitorEvent;
+
 enum {
-       SAMPLE_CYCLES = 1,
-       SAMPLE_INSTRUCTIONS,
-       SAMPLE_CACHE_MISSES,
-       SAMPLE_CACHE_REFS,
-       SAMPLE_BRANCHES,
-       SAMPLE_BRANCH_MISSES,
-       SAMPLE_LAST
+       MONO_PROFILER_GC_HANDLE_CREATED,
+       MONO_PROFILER_GC_HANDLE_DESTROYED,
 };
 
-
 // If you alter MAX_FRAMES, you may need to alter SAMPLE_BLOCK_SIZE too.
 #define MAX_FRAMES 32
 
@@ -195,7 +200,7 @@ enum {
 
 //The follow flags are the common aliases we want ppl to use
 #define PROFLOG_TYPELOADING_ALIAS (PROFLOG_DOMAIN_EVENTS | PROFLOG_ASSEMBLY_EVENTS | PROFLOG_MODULE_EVENTS | PROFLOG_CLASS_EVENTS)
-#define PROFLOG_CODECOV_ALIAS (PROFLOG_GC_EVENTS | PROFLOG_THREAD_EVENTS | PROFLOG_CALL_EVENTS | PROFLOG_INS_COVERAGE_EVENTS | PROFLOG_CODE_COV_FEATURE)
+#define PROFLOG_CODECOV_ALIAS (PROFLOG_INS_COVERAGE_EVENTS | PROFLOG_CODE_COV_FEATURE)
 #define PROFLOG_PERF_SAMPLING_ALIAS (PROFLOG_TYPELOADING_ALIAS | PROFLOG_THREAD_EVENTS | PROFLOG_SAMPLING_EVENTS | PROFLOG_SAMPLING_FEATURE)
 #define PROFLOG_GC_ALLOC_ALIAS (PROFLOG_TYPELOADING_ALIAS | PROFLOG_THREAD_EVENTS | PROFLOG_GC_EVENTS | PROFLOG_ALLOCATION_EVENTS)
 #define PROFLOG_HEAPSHOT_ALIAS (PROFLOG_TYPELOADING_ALIAS | PROFLOG_THREAD_EVENTS | PROFLOG_GC_EVENTS | PROFLOG_GC_ROOT_EVENTS | PROFLOG_HEAPSHOT_FEATURE)
@@ -226,9 +231,6 @@ typedef struct {
        //If true, don't generate stacktraces
        gboolean notraces;
 
-       //If true, emit coverage but don't emit enter/exit events - this happens cuz they share an event
-       gboolean only_coverage;
-
        //If true, heapshots are generated on demand only
        gboolean hs_mode_ondemand;
 
@@ -259,7 +261,7 @@ typedef struct {
        //Max size of the sample hit buffer, we'll drop frames if it's reached
        int max_allocated_sample_hits;
 
-       MonoProfileSamplingMode sampling_mode;
+       MonoProfilerSampleMode sampling_mode;
 } ProfilerConfig;
 
 void proflog_parse_args (ProfilerConfig *config, const char *desc);