public Backtrace (BinaryReader reader) { Flags = reader.ReadULeb128 (); ulong num = reader.ReadULeb128 (); Frame = new long[num]; for (ulong i = 0; i < num; i++) { Frame [i] = reader.ReadSLeb128 (); } }
public readonly ulong Size; // size of the object in the heap #endregion Fields #region Constructors AllocEvent(BinaryReader reader, byte extendedInfo) { TimeDiff = reader.ReadULeb128 (); Ptr = reader.ReadSLeb128 (); Obj = reader.ReadSLeb128 (); Size = reader.ReadULeb128 (); if ((extendedInfo & TYPE_ALLOC_BT) != 0) Backtrace = new Backtrace (reader); }
HandleCreatedGcEvent (BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); HandleType = (System.Runtime.InteropServices.GCHandleType)reader.ReadULeb128 (); Handle = reader.ReadULeb128 (); ObjAddr = reader.ReadSLeb128 (); }
public UBinSampleEvent(BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); Address = reader.ReadSLeb128 (); Offset = reader.ReadULeb128 (); Size = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); }
public readonly ulong HeapSize; // new heap size #endregion Fields #region Constructors ResizeGcEvent(BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); HeapSize = reader.ReadULeb128 (); }
public readonly long Object; // the lock object as a difference from obj_base #endregion Fields #region Constructors MonitiorEvent(BinaryReader reader, byte exinfo) { TimeDiff = reader.ReadULeb128 (); Object = reader.ReadSLeb128 (); byte ev = (byte)((exinfo >> 4) & 0x3); if (ev == MONO_PROFILER_MONITOR_CONTENTION && (exinfo & TYPE_MONITOR_BT) == TYPE_MONITOR_BT) { Backtrace = new Backtrace (reader); } }
public readonly long Pointer; // pointer of the metadata type depending on mtype #endregion Fields #region Constructors MetadataEvent(BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); MType = (MetaDataType)reader.ReadByte (); Pointer = reader.ReadSLeb128 (); switch (MType) { case MetaDataType.Class: Image = reader.ReadSLeb128 (); Flags = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); break; case MetaDataType.Image: Flags = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); break; case MetaDataType.Thread: Flags = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); break; } }
HeapEvent(BinaryReader reader, byte exinfo) { if (exinfo == TYPE_HEAP_START) { Type = EventType.Start; TimeDiff = reader.ReadULeb128 (); } else if (exinfo == TYPE_HEAP_END) { Type = EventType.End; TimeDiff = reader.ReadULeb128 (); } else if (exinfo == TYPE_HEAP_ROOT) { Type = EventType.Root; ulong nroots = reader.ReadULeb128 (); reader.ReadULeb128 (); // gcs RootRefs = new long [nroots]; RootRefTypes = new RootType [nroots]; RootRefExtraInfos = new ulong [nroots]; for (ulong n=0; n<nroots; n++) { RootRefs [n] = reader.ReadSLeb128 (); RootRefTypes [n] = (RootType) reader.ReadULeb128 (); RootRefExtraInfos [n] = reader.ReadULeb128 (); } } else if (exinfo == TYPE_HEAP_OBJECT) { Type = EventType.Object; Object = reader.ReadSLeb128 (); Class = reader.ReadSLeb128 (); Size = reader.ReadULeb128 (); ulong num = reader.ReadULeb128 (); ObjectRefs = new long[num]; RelOffset = new ulong[num]; for (ulong i = 0; i < num; i++) { RelOffset [i] = reader.ReadULeb128 (); ObjectRefs [i] = reader.ReadSLeb128 (); } } }
public readonly long ObjAddr; // object pointer differences from obj_base #endregion Fields #region Constructors HandleCreatedGcEvent(BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); HandleType = reader.ReadULeb128 (); Handle = reader.ReadULeb128 (); ObjAddr = reader.ReadSLeb128 (); }
public MethodJitEvent (BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); Method = reader.ReadSLeb128 (); CodeAddress = reader.ReadSLeb128 (); CodeSize = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); }
public MethodExcLeaveEvent (BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); Method = reader.ReadSLeb128 (); }
internal MetaDataThreadEvent (BinaryReader reader) { Flags = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); }
internal MetaDataClassEvent (BinaryReader reader) { Image = reader.ReadSLeb128 (); Flags = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); }
public static new Event Read (BinaryReader reader) { ulong timeDiff = reader.ReadULeb128 (); byte type = reader.ReadByte (); long pointer = reader.ReadSLeb128 (); MetadataEvent result; switch (type) { case TYPE_CLASS: result = new MetaDataClassEvent (reader); break; case TYPE_IMAGE: result = new MetaDataImageEvent (reader); break; case TYPE_ASSEMBLY: result = new MetaDataAssemblyEvent (); break; case TYPE_DOMAIN: result = new MetaDataDomainEvent (); break; case TYPE_THREAD: result = new MetaDataThreadEvent (reader); break; default: throw new InvalidOperationException ("Unknown metadata event type:" + type); } result.TimeDiff = timeDiff; result.Pointer = pointer; return result; }
HandleDestroyedGcEvent (BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); HandleType = (System.Runtime.InteropServices.GCHandleType)reader.ReadULeb128 (); Handle = reader.ReadULeb128 (); }
public readonly long Object; // the object that was thrown as a difference from obj_base If the TYPE_EXCEPTION_BT flag is set, a backtrace follows. #endregion Fields #region Constructors ExceptionEvent(BinaryReader reader, byte exinfo) { TimeDiff = reader.ReadULeb128 (); byte subtype = (byte)(exinfo & 0x70); if (subtype == TYPE_CLAUSE) { ClauseType = reader.ReadULeb128 (); ClauseNum = reader.ReadULeb128 (); Method = reader.ReadSLeb128 (); } else if (subtype == TYPE_THROW) { Object = reader.ReadSLeb128 (); if ((exinfo & TYPE_EXCEPTION_BT) == TYPE_EXCEPTION_BT) Backtrace = new Backtrace (reader); } }
public readonly ulong Generation; // GC generation event refers to #endregion Fields #region Constructors GcEvent(BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); EventType = (GcEventType) reader.ReadULeb128 (); Generation = reader.ReadULeb128 (); }
internal ExceptionClauseEvent (BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); ClauseType = reader.ReadULeb128 (); ClauseNum = reader.ReadULeb128 (); Method = reader.ReadSLeb128 (); }
public readonly ulong HandleType; // GC handle type (System.Runtime.InteropServices.GCHandleType) #endregion Fields #region Constructors HandleDestroyedGcEvent(BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); HandleType = reader.ReadULeb128 (); Handle = reader.ReadULeb128 (); }
internal ExceptionThrowEvent (BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); Object = reader.ReadSLeb128 (); }
public HitSampleEvent(BinaryReader reader) { SampleType = (SampleType) reader.ReadULeb128 (); Timestamp = reader.ReadULeb128 (); ulong count = reader.ReadULeb128 (); InstructionPointers = new long [count]; for (uint n=0; n<count; n++) InstructionPointers [n] = reader.ReadSLeb128 (); }
MonitiorEvent (BinaryReader reader, byte exinfo) { TimeDiff = reader.ReadULeb128 (); Object = reader.ReadSLeb128 (); if (exinfo == MONO_PROFILER_MONITOR_CONTENTION) { Backtrace = new Backtrace (reader); } }
MethodEvent(BinaryReader reader, byte exinfo) { TimeDiff = reader.ReadULeb128 (); Method = reader.ReadSLeb128 (); Type = (MethodType)exinfo; if (Type == MethodType.Jit) { CodeAddress = reader.ReadSLeb128 (); CodeSize = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); } }
public HeapEndEvent (BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); }
public readonly long[] ObjAddr; // num_objects object pointer differences from obj_base #endregion Fields #region Constructors MoveGcEvent(BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); ulong num = reader.ReadULeb128 (); ObjAddr = new long[num]; for (ulong i = 0; i < num; i++) { ObjAddr [i] = reader.ReadSLeb128 (); } }
public HeapObjectEvent (BinaryReader reader) { Object = reader.ReadSLeb128 (); Class = reader.ReadSLeb128 (); Size = reader.ReadULeb128 (); ulong num = reader.ReadULeb128 (); ObjectRefs = new long[num]; RelOffset = new ulong[num]; for (ulong i = 0; i < num; i++) { RelOffset [i] = reader.ReadULeb128 (); ObjectRefs [i] = reader.ReadSLeb128 (); } }
public HeapRootEvent (BinaryReader reader) { ulong numRoots = reader.ReadULeb128 (); NumGc = reader.ReadULeb128 (); Object = new long [numRoots]; RootType = new ulong [numRoots]; ExtraInfo = new ulong [numRoots]; for (ulong i = 0; i < numRoots; i++) { Object[i] = reader.ReadSLeb128 (); RootType[i] = reader.ReadULeb128 (); ExtraInfo[i] = reader.ReadULeb128 (); } }
public SampleHitEvent (BinaryReader reader) { Type = (SampleType)reader.ReadULeb128 (); TimeStamp = reader.ReadULeb128 (); ulong num = reader.ReadULeb128 (); Ip = new long[num]; for (ulong i = 0; i < num; i++) { Ip[i] = reader.ReadSLeb128 (); } }
public USymSampleEvent(BinaryReader reader) { Address = reader.ReadSLeb128 (); Size = reader.ReadULeb128 (); Name = reader.ReadNullTerminatedString (); }
public readonly ulong Generation; // GC generation event refers to GcEvent (BinaryReader reader) { TimeDiff = reader.ReadULeb128 (); GcEventType = (MonoGCEvent)reader.ReadULeb128 (); Generation = reader.ReadULeb128 (); }