예제 #1
0
 public TraceElementHeader(TraceElementHeader header)
 {
     header.RawTypeIndex     = RawTypeIndex;
     header.Length           = Length;
     header.WallTime         = WallTime;
     header.InstructionCount = InstructionCount;
 }
예제 #2
0
        public static PerfElement Generate(TraceElementHeader header, BinaryReader reader)
        {
            var element = new PerfElement(header)
            {
                MemPages = reader.ReadUInt32()
            };

            return(element);
        }
예제 #3
0
        public static ReturnElement Generate(TraceElementHeader header, BinaryReader reader)
        {
            var element = new ReturnElement(header)
            {
                Eip   = reader.ReadUInt32(),
                ToEip = reader.ReadUInt32(),
                Esp   = reader.ReadUInt32()
            };

            return(element);
        }
예제 #4
0
        public static TraceElementHeader Generate(BinaryReader reader)
        {
            var traceElementHeader = new TraceElementHeader
            {
                RawTypeIndex     = reader.ReadUInt32(),
                Length           = reader.ReadUInt32(),
                WallTime         = reader.ReadDouble(),
                InstructionCount = (int)reader.ReadUInt64()
            };

            return(traceElementHeader);
        }
예제 #5
0
        //private static readonly string[] s_BranchTypeNames =
        //{
        //    "Call",
        //    "Return",
        //    "Jump",
        //    "Conditional (not taken)",
        //    "Conditional (taken)",
        //};

        public static BranchElement Generate(TraceElementHeader header, BinaryReader reader)
        {
            var branchElement = new BranchElement(header)
            {
                BranchType = reader.ReadUInt32(),
                Eip        = reader.ReadUInt32(),
                ToEip      = reader.ReadUInt32()
            };

            branchElement.BranchTypeName = (BranchTypes)branchElement.BranchType;

            return(branchElement);
        }
예제 #6
0
        public static InstructionDisasmElement Generate(TraceElementHeader header, BinaryReader reader)
        {
            uint bytesReadSoFar = 0;

            var instructionDisasmElement = new InstructionDisasmElement(header);

            //bytesReadSoFar += TraceElementHeader.SizeInBytes;

            instructionDisasmElement.Eip = reader.ReadUInt32();
            bytesReadSoFar += sizeof(UInt32);

            instructionDisasmElement.Disassembly = instructionDisasmElement.ReadToLength(reader, bytesReadSoFar);

            return(instructionDisasmElement);
        }
예제 #7
0
        public static InstructionOnlyElement Generate(TraceElementHeader header, BinaryReader reader)
        {
            uint bytesReadSoFar = 0;

            var instructionElement = new InstructionOnlyElement(header);

            //bytesReadSoFar += TraceElementHeader.SizeInBytes;

            instructionElement.Eip = reader.ReadUInt32();
            bytesReadSoFar        += sizeof(UInt32);

            instructionElement.ByteString = instructionElement.ReadToLength(reader, bytesReadSoFar, ReadToLengthFormat.Hex);

            return(instructionElement);
        }
예제 #8
0
        public static TypeDeclarationElement Generate(TraceElementHeader header, BinaryReader reader)
        {
            uint bytesReadSoFar = 0;

            var element = new TypeDeclarationElement(header);

            //bytesReadSoFar += TraceElementHeader.SizeInBytes;

            element.ElementTypeIndex = reader.ReadUInt32();
            bytesReadSoFar          += sizeof(UInt32);

            element.ElementTypeStringIdentifier = element.ReadToLength(reader, bytesReadSoFar);

            return(element);
        }
예제 #9
0
        public static InstructionRegsDisasmElement Generate(TraceElementHeader header, BinaryReader reader)
        {
            uint bytesReadSoFar = 0;

            var instructionRegsDisasmElement = new InstructionRegsDisasmElement(header);

            //bytesReadSoFar += TraceElementHeader.SizeInBytes;

            instructionRegsDisasmElement.Regs = TraceElementRegs.Generate(reader);
            bytesReadSoFar += TraceElementRegs.SizeInBytes;

            instructionRegsDisasmElement.Disassembly = instructionRegsDisasmElement.ReadToLength(reader, bytesReadSoFar);

            return(instructionRegsDisasmElement);
        }
예제 #10
0
        //public int InstructionIndex { get; set; }

        public static AnnotationElement Generate(TraceElementHeader header, BinaryReader reader)
        {
            var annotationElement = new AnnotationElement(header);

            uint bytesReadSoFar = 0;

            var eventCharacters = (int)reader.ReadUInt32();

            bytesReadSoFar += sizeof(UInt32);

            //bytesReadSoFar += TraceElementHeader.SizeInBytes;
            var descString = annotationElement.ReadToLength(reader, bytesReadSoFar);

            annotationElement.EventType = descString.Substring(0, eventCharacters);

            annotationElement.ByteString = descString.Substring(eventCharacters);

            return(annotationElement);
        }
예제 #11
0
 public PerfElement(TraceElementHeader header)
     : base(header)
 {
 }
예제 #12
0
 public TypeDeclarationElement(TraceElementHeader header)
     : base(header)
 {
 }
예제 #13
0
 public InstructionRegsDisasmElement(TraceElementHeader header)
     : base(header)
 {
 }
예제 #14
0
 public AnnotationElement(TraceElementHeader header, string elementType, string byteString) : base(header)
 {
     ByteString = byteString;
     EventType  = elementType;
 }
예제 #15
0
 public AnnotationElement(TraceElementHeader header) : base(header)
 {
 }
예제 #16
0
 public CallElement(TraceElementHeader header)
     : base(header)
 {
 }
예제 #17
0
 public ReturnElement(TraceElementHeader header)
     : base(header)
 {
 }
예제 #18
0
 public InstructionOnlyElement(TraceElementHeader header)
     : base(header)
 {
 }
예제 #19
0
 protected TraceElement(TraceElementHeader header)
 {
     Header = header;
 }
예제 #20
0
 public BranchElement(TraceElementHeader header)
     : base(header)
 {
 }
예제 #21
0
 protected InstructionElement(TraceElementHeader header)
     : base(header)
 {
 }
예제 #22
0
 public InstructionDisasmSchemaElement(TraceElementHeader header)
     : base(header)
 {
     Disassembly = "schema";
 }