Example #1
0
        private void finalHeapHistogramButton_Click(object sender, System.EventArgs e)
        {
            string title             = "Histogram by Size for Surviving Objects for " + scenario;
            var    histogramViewForm = new HistogramViewForm(GetFinalHeapHistogram(), title);

            histogramViewForm.Show();
        }
Example #2
0
        private void criticalFinalizedHistogramButton_Click(object sender, System.EventArgs e)
        {
            string title             = "Histogram by Size for Finalized Objects for " + scenario;
            var    histogramViewForm = new HistogramViewForm(logResult.criticalFinalizerHistogram, title);

            histogramViewForm.Show();
        }
Example #3
0
        private void showHistogramMenuItem_Click(object sender, System.EventArgs e)
        {
            TypeDesc selectedType = FindSelectedType();

            // Create a new histogram and add all the objects in the selected address range
            // whose type matches the selected type (if any).

            ReadNewLog log       = liveObjectTable.readNewLog;
            var        histogram = new Histogram(log);
            ulong      low       = selectedLowAddr;
            ulong      high      = low == 0 ? ulong.MaxValue : selectedHighAddr;

            LiveObjectTable.LiveObject o;
            for (liveObjectTable.GetNextObject(low, high, out o); o.id < high; liveObjectTable.GetNextObject(o.id + o.size, high, out o))
            {
                if (selectedType == null || selectedType.typeIndex == o.typeIndex)
                {
                    histogram.AddObject(o.typeSizeStacktraceIndex, 1);
                }
            }

            string title             = "Histogram by Size for live " + ComputeObjectsDescription(selectedType, selectedLowAddr, selectedHighAddr);
            var    histogramViewForm = new HistogramViewForm(histogram, title);

            histogramViewForm.Show();
        }
Example #4
0
        private void allocatedHistogramButton_Click(object sender, System.EventArgs e)
        {
            string title             = "Histogram by Size for Allocated Objects for: " + scenario;
            var    histogramViewForm = new HistogramViewForm(logResult.allocatedHistogram, title);

            histogramViewForm.Show();
        }
        private void showHistogramMenuItem_Click(object sender, System.EventArgs e)
        {
            TypeDesc selectedType = FindSelectedType();

            // Create a new histogram and add all the objects in the selected address range
            // whose type matches the selected type (if any).

            ReadNewLog log = liveObjectTable.readNewLog;
            Histogram histogram = new Histogram(log);
            ulong low = selectedLowAddr;
            ulong high = low == 0 ? ulong.MaxValue : selectedHighAddr;
            LiveObjectTable.LiveObject o;
            for (liveObjectTable.GetNextObject(low, high, out o); o.id < high; liveObjectTable.GetNextObject(o.id + o.size, high, out o))
            {
                if (selectedType == null || selectedType.typeIndex == o.typeIndex)
                    histogram.AddObject(o.typeSizeStacktraceIndex, 1);
            }

            string title = "Histogram by Size for live " + ComputeObjectsDescription(selectedType, selectedLowAddr, selectedHighAddr);
            HistogramViewForm histogramViewForm = new HistogramViewForm(histogram, title);
            histogramViewForm.Show();
        }
        private void showHistogramMenuItem_Click(object sender, System.EventArgs e)
        {
            if (graph.graphType == Graph.GraphType.HeapGraph)
            {
                Histogram histogram = MakeHistogram(-1, int.MaxValue);

                ObjectGraph objectGraph =  GetObjectGraph();
                string title = string.Format("Histogram by Size for Live Objects at {0}", objectGraph.readNewLog.TickIndexToTime(objectGraph.tickIndex));
                HistogramViewForm histogramViewForm = new HistogramViewForm(histogram, title);
                histogramViewForm.Show();
            }
        }
Example #7
0
 private void finalHeapHistogramButton_Click(object sender, System.EventArgs e)
 {
     string title = "Histogram by Size for Surviving Objects for " + scenario;
     HistogramViewForm histogramViewForm = new HistogramViewForm(GetFinalHeapHistogram(), title);
     histogramViewForm.Show();
 }
Example #8
0
 private void criticalFinalizedHistogramButton_Click(object sender, System.EventArgs e)
 {
     string title = "Histogram by Size for Finalized Objects for " + scenario;
     HistogramViewForm histogramViewForm = new HistogramViewForm(logResult.criticalFinalizerHistogram, title);
     histogramViewForm.Show();        
 }
Example #9
0
 private void allocatedHistogramButton_Click(object sender, System.EventArgs e)
 {
     string title = "Histogram by Size for Allocated Objects for: " + scenario;
     HistogramViewForm histogramViewForm = new HistogramViewForm(logResult.allocatedHistogram, title);
     histogramViewForm.Show();
 }
        private void showRelocatedMenuItem_Click(object sender, System.EventArgs e)
        {
            int startTickIndex = 0;
            int endTickIndex = lastTickIndex;
            if (selectedStartTickIndex != 0)
            {
                startTickIndex = selectedStartTickIndex;
                endTickIndex = selectedEndTickIndex;
            }
            ReadNewLog log = sampleObjectTable.readNewLog;
            long startPos = log.TickIndexToPos(startTickIndex);
            long endPos = log.TickIndexToPos(endTickIndex);

            // Read the selected portion of the log again

            ReadLogResult readLogResult = new ReadLogResult();
            readLogResult.relocatedHistogram = new Histogram(log);
            readLogResult.liveObjectTable = new LiveObjectTable(log);
            log.ReadFile(startPos, endPos, readLogResult);

            // And post it to a new histogram form - hardest part is to compute an appropriate title...

            string title = string.Format("Histogram by Size for Objects relocated between {0:f3} and {1:f3} seconds", lastLog.TickIndexToTime(startTickIndex), lastLog.TickIndexToTime(endTickIndex));
            HistogramViewForm histogramViewForm = new HistogramViewForm(readLogResult.relocatedHistogram, title);
            histogramViewForm.Show();
        }
 private void viewHistogramCriticalFinalizerMenuItem_Click(object sender, System.EventArgs e)
 {
     if (clrProfiler.lastLogResult != null)
     {
         string title = "Histogram by Size for Critical Finalized Objects";
         HistogramViewForm histogramViewForm = new HistogramViewForm(clrProfiler.lastLogResult.criticalFinalizerHistogram, title);
         histogramViewForm.Show();
     }
 }
 private void viewHistogramRelocatedMenuItem_Click(object sender, System.EventArgs e)
 {
     if (clrProfiler.lastLogResult != null)
     {
         string title = "Histogram by Size for Relocated Objects";
         HistogramViewForm histogramViewForm = new HistogramViewForm(clrProfiler.lastLogResult.relocatedHistogram, title);
         histogramViewForm.Show();
     }
 }
 private void viewHistogram_Click(object sender, System.EventArgs e)
 {
     HistogramViewForm histogramViewForm = new HistogramViewForm();
     histogramViewForm.Visible = true;
 }