1 #ifndef __MONO_PROFILER_AOT_H__ 2 #define __MONO_PROFILER_AOT_H__ 3 4 #include <config.h> 5 6 /* 7 * File format: 8 * - magic (AOT_PROFILER_MAGIC) 9 * - int: major/minor version, e.g. 0x00010000 (AOT_PROFILER_MAJOR_VERSION, AOT_PROFILER_MINOR_VERSION) 10 * - sequence of records terminated by an AOTPROF_RECORD_NONE record 11 * 12 * Record format: 13 * - byte: record type (AotProfRecordType) 14 * - int: record id (unique across all record types in the file) 15 * - followed by record specific data (see below) 16 * 17 * Encoding rules: 18 * - int: 4 bytes little endian 19 * - string: int length followed by UTF-8 data (no null terminator) 20 */ 21 22 typedef enum { 23 /* 24 * Indicates EOF. No additional record data. 25 */ 26 AOTPROF_RECORD_NONE, 27 /* 28 * Contains info about a loaded image. 29 * - string: assembly name 30 * - string: module mvid 31 */ 32 AOTPROF_RECORD_IMAGE, 33 /* 34 * Contains info about a type referenced by other records. 35 * - byte: MONO_TYPE_CLASS 36 * - int: record id for the containing image (AOTPROF_RECORD_IMAGE) 37 * - int: record id for the generic instance or -1 if N/A (AOTPROF_RECORD_GINST) 38 * - string: type name 39 */ 40 AOTPROF_RECORD_TYPE, 41 /* 42 * Contains info about a generic instantiation of a type or method. 43 * - int: type argument count 44 * - for 0 .. type argument count: 45 * -- int: record id for the type argument (AOTPROF_RECORD_TYPE) 46 */ 47 AOTPROF_RECORD_GINST, 48 /* 49 * Contains info about a JITed method. 50 * - int: record id for the containing class (AOTPROF_RECORD_TYPE) 51 * - int: record id for the generic instance or -1 if N/A (AOTPROF_RECORD_GINST) 52 * - int: parameter count 53 * - string: method name 54 * - string: method signature 55 */ 56 AOTPROF_RECORD_METHOD 57 } AotProfRecordType; 58 59 #define AOT_PROFILER_MAGIC "AOTPROFILE" 60 61 #define AOT_PROFILER_MAJOR_VERSION 1 62 #define AOT_PROFILER_MINOR_VERSION 0 63 64 #endif /* __MONO_PROFILER_AOT_H__ */ 65