public void Initialise(HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer) { if (aReconstructor != null) { iHighestCellAllocationNumber = aReconstructor.Statistics.StatsAllocated.CellAllocationNumberLargest.AllocationNumber; } }
public void Initialise(HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer) { SelectionBorder.Initialise(aCells, aReconstructor, aRenderer); Header.Initialise(aCells, aReconstructor, aRenderer); Content.Initialise(aCells, aReconstructor, aRenderer); ContentBorder.Initialise(aCells, aReconstructor, aRenderer); }
private void HeapReconstructorObserver(HeapReconstructor.TEvent aEvent, HeapReconstructor aReconstructor) { if (InvokeRequired) { HeapReconstructor.Observer observer = new HeapReconstructor.Observer(HeapReconstructorObserver); this.BeginInvoke(observer, new object[] { aEvent, aReconstructor }); } else { switch (aEvent) { case HeapReconstructor.TEvent.EReconstructingStarted: iProgressBar.Maximum = 100; //% iProgressBar.Minimum = 0; //% iProgressBar.Value = 0; break; case HeapReconstructor.TEvent.EReconstructingProgress: iProgressBar.Value = iReconstructor.Progress; break; case HeapReconstructor.TEvent.EReconstructingComplete: Close(); break; } } }
public void Initialise(HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer) { iRenderer = aRenderer; // iFactory = (FactoryByObject)aRenderer.Factory; iFactory.PrepareColourHashes(aReconstructor, StandardColours); }
public HeapToHTMLPageEntireListing(HeapReconstructor aReconstructor, TSortType aSortType, string aFileName) : base(aFileName) { iSortType = aSortType; iReconstructor = aReconstructor; // Make a new (but empty) array iEntries = new HeapCellArray(aReconstructor.Data.Count + 1); // Depending on the sort type, trigger the sort method // in the array. Since the array is empty this won't // do a lot, except set up the array to use our chosen // comparison object... switch (iSortType) { default: case TSortType.ESortTypeByAddress: iEntries.SortByAddress(); break; case TSortType.ESortTypeByType: iEntries.SortByType(); break; case TSortType.ESortTypeByLength: iEntries.SortByLength(); break; } // Now copy the entries into the array iEntries.Copy(aReconstructor.Data); }
public void CreateParser() { if (iDataSource == null) { throw new NotSupportedException("Data source is not yet initialised"); } // iReconstructor = new HeapReconstructor(DataSource, ReconstructorOptions, DebugEngine); HeapUiLib.Dialogs.HeapReconstructorProgressDialog.ParseLog(Reconstructor); }
public HeapToHTMLPageHeapCellManager(HeapReconstructor aReconstructor, string aBasePath) { iReconstructor = aReconstructor; iEntries = iReconstructor.Data; iBasePath = aBasePath; // Make sure our required directories exist HeapToHTMLConverter.PageDirectoryNameEnsuringPathExists(iBasePath, "HeapData"); HeapToHTMLConverter.PageDirectoryNameEnsuringPathExists(iBasePath, "HeapLinkInfo"); }
public HeapExportToHTMLProgressDialog(HeapReconstructor aReconstructor, string aOutputDirectory) { InitializeComponent(); // iReconstructor = aReconstructor; // iConverter = new HeapToHTMLConverter(aReconstructor, aOutputDirectory); iConverter.Observer += new HeapToHTMLConverter.EventHandler(Converter_Observer); // iTimer_OpStart.Start(); }
public HeapToHTMLConverter(HeapReconstructor aReconstructor, string aBaseOutputPath) { iReconstructor = aReconstructor; iBaseOutputPath = aBaseOutputPath; // Make sure output base path exists DirectoryInfo dirInfo = new DirectoryInfo(aBaseOutputPath); if (dirInfo.Exists == false) { dirInfo.Create(); } }
public void Initialise(HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer) { if (aReconstructor != null) { uint largestLenAlloc = aReconstructor.Statistics.StatsAllocated.CellLargest.Length; uint largestLenFree = aReconstructor.Statistics.StatsFree.CellLargest.Length; iCellLengthLongest = Math.Max(largestLenAlloc, largestLenFree); // uint smallestLenAlloc = aReconstructor.Statistics.StatsAllocated.CellSmallest.Length; uint smallestLenFree = aReconstructor.Statistics.StatsFree.CellSmallest.Length; iCellLengthSmallest = Math.Min(smallestLenAlloc, smallestLenFree); } }
public void Initialise(HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer) { if (aReconstructor != null) { int min = aReconstructor.Statistics.StatsAllocated.CellNumberOfEmbeddedReferencesLeast.RelationshipManager.EmbeddedReferencesTo.Count + 1; double logMin = Math.Log((double)min); // int max = aReconstructor.Statistics.StatsAllocated.CellNumberOfEmbeddedReferencesMost.RelationshipManager.EmbeddedReferencesTo.Count + 1; double logMax = Math.Log((double)max); iDomain = (float)(logMax - logMin); } }
internal HeapReconstructorProgressDialog(HeapReconstructor aReconstructor, string aTitle) { iReconstructor = aReconstructor; // InitializeComponent(); // iTimer_OpStart.Start(); // if (aTitle != string.Empty) { this.Text = aTitle; } // iReconstructor.iObserver += new HeapReconstructor.Observer(HeapReconstructorObserver); }
private void HeapReconstructorObserver(HeapReconstructor.TEvent aEvent, HeapReconstructor aReconstructor) { if (InvokeRequired) { HeapReconstructor.Observer observer = new HeapReconstructor.Observer(HeapReconstructorObserver); this.BeginInvoke(observer, new object[] { aEvent, aReconstructor }); } else { // Select correct progress bar... string title = "Reading Heap 1..."; if (aReconstructor == iReconstructor2) { title = "Reading Heap 2..."; } // switch (aEvent) { case HeapReconstructor.TEvent.EReconstructingStarted: this.Text = title; iProgBar.Maximum = 100; //% iProgBar.Minimum = 0; //% iProgBar.Value = 0; break; case HeapReconstructor.TEvent.EReconstructingProgress: iProgBar.Value = aReconstructor.Progress; break; case HeapReconstructor.TEvent.EReconstructingComplete: iProgBar.Value = 100; if (aReconstructor == iReconstructor1) { // Finished first heap, now move on to second iReconstructor2.Reconstruct(); } else { // Start output engine iComparisonEngine.Compare(); } break; } } }
internal void PrepareColourHashes(HeapReconstructor aReconstructor, List <KnownColor> aStandardColours) { if (iColourHashes.Count == 0) { // Pick colours at random from the standard colours until we have used them all System.Random random = new Random(0); // How many objects do we have to colourise? int count = aReconstructor.Statistics.StatsAllocated.TrackerSymbols.Count; for (int i = 0; i < count; i++) { // Get associated symbol item TrackingInfo item = aReconstructor.Statistics.StatsAllocated.TrackerSymbols[i]; // Form caption string caption = item.Symbol.NameWithoutVTablePrefix; // If we still have some system colours left, then we'll // try to use them up. Otherwise, we'll resort to generating // random colors. Color col = Color.Black; // if (aStandardColours.Count > 0) { // Get system colour index int colItemIndex = random.Next(0, aStandardColours.Count - 1); // Link colour with symbol KnownColor knownCol = (KnownColor)aStandardColours[colItemIndex]; col = Color.FromKnownColor(knownCol); // Remove known colour so we don't use it again aStandardColours.RemoveAt(colItemIndex); } else { // Get random known colour col = iColorUtil.GenerateRandomColour(random); } // Associate object with colour string hash = HeapCellRendererColourBySymbol.MakeColourHash(item.Symbol); iColourHashes.Add(hash, caption, col, item); } } }
private ComparisonProgressDialogData(HeapReconstructor aReconstructor1, HeapReconstructor aReconstructor2, string aFileName) { iReconstructor1 = aReconstructor1; iReconstructor2 = aReconstructor2; // InitializeComponent(); // iReconstructor1.iObserver += new HeapReconstructor.Observer(HeapReconstructorObserver); iReconstructor2.iObserver += new HeapReconstructor.Observer(HeapReconstructorObserver); // iComparisonEngine = new ComparsionEngine(iReconstructor1, iReconstructor2); iComparisonEngine.iObserver += new AsyncReaderBase.Observer(ComparisonEngineObserver); // iComparisonWriter = new ComparisonWriter(iComparisonEngine, aFileName); iComparisonWriter.iObserver += new AsyncTextWriterBase.Observer(ComparsionWriterObserver); // iTimer_OpStart.Start(); }
public HeapToFileConverter(bool aShowOnlySymbolicMatches, HeapReconstructor aReconstructor) { iShowOnlySymbolicMatches = aShowOnlySymbolicMatches; iReconstructor = aReconstructor; }
public void Initialise(HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer) { }
public PageUnique(HeapReconstructor aReconstructor, HeapCellArrayWithStatistics aArray, Workbook aWorkbook, string aCaption, int aMasterCol, int aOtherCol) : base(aArray, aWorkbook, aCaption, aMasterCol, aOtherCol) { iReconstructor = aReconstructor; }
public HeapToHTMLPageHeapLinkedCells(HeapReconstructor aReconstructor, string aFileName, HeapCell aCell) : base(aFileName, TNotUsingThread.ENotUsingThread) { iReconstructor = aReconstructor; iCell = aCell; }
public HeapToHTMLPageJavaScriptManager(HeapReconstructor aReconstructor, string aBasePath) { iReconstructor = aReconstructor; iEntries = iReconstructor.Data; iBasePath = aBasePath; }
public static void ParseLog(HeapReconstructor aReconstructor) { ParseLog(aReconstructor, string.Empty); }
public static void ParseLog(HeapReconstructor aReconstructor, string aTitle) { HeapReconstructorProgressDialog self = new HeapReconstructorProgressDialog(aReconstructor, aTitle); self.ShowDialog(); }
public HeapToHTMLPageIndex(HeapReconstructor aReconstructor, string aFileName) : base(aFileName) { iReconstructor = aReconstructor; }
public void CreateReconstructors() { iReconstructor1 = new HeapReconstructor(DataSource1, ReconstructorOptions, DebugEngine); iReconstructor2 = new HeapReconstructor(DataSource2, ReconstructorOptions, DebugEngine); }
public ComparsionEngine(HeapReconstructor aReconstructor1, HeapReconstructor aReconstructor2) : base(new ComparsionCellSupplierProxy(aReconstructor1)) { iReconstructor1 = aReconstructor1; iReconstructor2 = aReconstructor2; }
public ComparsionCellSupplierProxy(HeapReconstructor aReconstructor) { iReconstructor = aReconstructor; }
public static void Compare(HeapReconstructor aReconstructor1, HeapReconstructor aReconstructor2, string aFileName) { ComparisonProgressDialogData self = new ComparisonProgressDialogData(aReconstructor1, aReconstructor2, aFileName); self.ShowDialog(); }