Ejemplo n.º 1
0
        public EventPipeEventSource(string fileName)
        {
            _processName = "ProcessBeingTraced";
            osVersion    = new Version("0.0.0.0");
            cpuSpeedMHz  = 10;

            _deserializer = new Deserializer(new PinnedStreamReader(fileName, 0x20000), fileName);
            _deserializer.RegisterFactory("Microsoft.DotNet.Runtime.EventPipeFile", delegate { return(this); });

            var entryObj = _deserializer.GetEntryObject(); // this call invokes FromStream and reads header data

            // Because we told the deserialize to use 'this' when creating a EventPipeFile, we
            // expect the entry object to be 'this'.
            Debug.Assert(entryObj == this);

            _eventParser = new EventPipeTraceEventParser(this);
        }
Ejemplo n.º 2
0
        public EventPipeEventSource(string fileName)
        {
            _processName = "ProcessBeingTraced";
            osVersion    = new Version("0.0.0.0");
            cpuSpeedMHz  = 10;

            _deserializer = new Deserializer(new PinnedStreamReader(fileName, 0x20000), fileName);

#if SUPPORT_V1_V2
            // This is only here for V2 and V1.  V3+ should use the name EventTrace, it can be removed when we drop support.
            _deserializer.RegisterFactory("Microsoft.DotNet.Runtime.EventPipeFile", delegate { return(this); });
#endif
            _deserializer.RegisterFactory("Trace", delegate { return(this); });
            _deserializer.RegisterFactory("EventBlock", delegate { return(new EventPipeEventBlock(this)); });

            var entryObj = _deserializer.GetEntryObject(); // this call invokes FromStream and reads header data

            // Because we told the deserialize to use 'this' when creating a EventPipeFile, we
            // expect the entry object to be 'this'.
            Debug.Assert(entryObj == this);

            _eventParser = new EventPipeTraceEventParser(this);
        }