Ejemplo n.º 1
0
        public static void SelectHistogramBar(FHistogramBar Bar)
        {
            if (Bar != SelectedHistogramBar)
            {
                // Cancel any subselection if the main selection is changing.
                SubselectedHistogramBar = null;
            }

            SelectedHistogramBar = Bar;

            if (SelectedHistogramBar != null)
            {
                HistogramSelectionBars.Clear();
                foreach (FCallStackAllocationInfo AllocationInfo in SelectedHistogramBar.CallStackList)
                {
                    int    Address      = FStreamInfo.GlobalInstance.CallStackArray[AllocationInfo.CallStackIndex].AddressIndices[0];
                    string FunctionName = FStreamInfo.GlobalInstance.NameArray[FStreamInfo.GlobalInstance.CallStackAddressArray[Address].FunctionIndex];

                    FHistogramBar AllocBar = new FHistogramBar(FunctionName, SelectedHistogramBar.Colour);
                    AllocBar.AddAllocation(AllocationInfo);

                    HistogramSelectionBars.Add(AllocBar);
                }
            }

            UpdateHistogramDetails();
            OwnerWindow.HistogramPanel.Invalidate();
        }
Ejemplo n.º 2
0
		public static void SelectHistogramBar( FHistogramBar Bar )
		{
			if( Bar != SelectedHistogramBar )
			{
				// Cancel any subselection if the main selection is changing.
				SubselectedHistogramBar = null;
			}

			SelectedHistogramBar = Bar;

			if( SelectedHistogramBar != null )
			{
				HistogramSelectionBars.Clear();
				foreach( FCallStackAllocationInfo AllocationInfo in SelectedHistogramBar.CallStackList )
				{
					int Address = FStreamInfo.GlobalInstance.CallStackArray[ AllocationInfo.CallStackIndex ].AddressIndices[ 0 ];
					string FunctionName = FStreamInfo.GlobalInstance.NameArray[ FStreamInfo.GlobalInstance.CallStackAddressArray[ Address ].FunctionIndex ];

					FHistogramBar AllocBar = new FHistogramBar( FunctionName, SelectedHistogramBar.Colour );
					AllocBar.AddAllocation( AllocationInfo );

					HistogramSelectionBars.Add( AllocBar );
				}
			}

			UpdateHistogramDetails();
			OwnerWindow.HistogramPanel.Invalidate();
		}