Beispiel #1
0
        internal override Session EnableProviders()
        {
            var osHeapExe = Path.GetFileName(Path.ChangeExtension(Details.Process.StartInfo.FileName, ".exe"));

            TraceEventSession.EnableWindowsHeapProvider(osHeapExe);
            return(this);
        }
        public void Start(int pid)
        {
            TraceEventSession.GetActiveSession("HeapSession")?.Dispose();

            _session = new TraceEventSession("HeapSession");

            _session.EnableWindowsHeapProvider(pid);
            _session.Source.Dynamic.All           += Source_AllEvents;
            _session.Source.Kernel.StackWalkStack += Kernel_StackWalkStack;

            Task.Factory.StartNew(() => _session.Source.Process());
        }