private void DetermineNeededRegions() { if (_dumpType == DumpType.Minimal) { return; } var readerType = typeof(DataTarget).Assembly.GetType("Microsoft.Diagnostics.Runtime.LiveDataReader"); var reader = (IDataReader)Activator.CreateInstance(readerType, _pid); var readerLogger = new DumpReaderLogger(reader); var target = DataTarget.CreateFromDataReader(readerLogger); foreach (var clrVersion in target.ClrVersions) { var runtime = clrVersion.CreateRuntime(); AddCLRRegions(runtime); TouchOtherRegions(readerLogger, runtime); _logger.WriteLine("{0} ranges requested by the DAC, total size {1:N0}", _otherClrRegions.Count, _otherClrRegions.Sum(r => (long)(r.Key - r.Value)) ); _logger.WriteLine("{0} CLR regions, total size {1:N0}", _majorClrRegions.Count, _majorClrRegions.Sum(r => (long)(r.Key - r.Value)) ); } }