diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml index fa81e199df..8b25ef9b71 100644 --- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml +++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml @@ -30,7 +30,7 @@ - + diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs index 9e30d9533c..fa0482c8e8 100644 --- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs +++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs @@ -31,10 +31,10 @@ namespace ICSharpCode.Profiler.AddIn.Views this.provider = provider; - this.timeLine2.IsEnabled = true; - this.timeLine2.Provider = provider; - this.timeLine2.SelectedStartIndex = 0; - this.timeLine2.SelectedEndIndex = provider.DataSets.Count; + this.timeLine.IsEnabled = true; + this.timeLine.Provider = provider; + this.timeLine.SelectedStartIndex = 0; + this.timeLine.SelectedEndIndex = provider.DataSets.Count - 1; var translation = new SharpDevelopTranslation(); @@ -44,7 +44,7 @@ namespace ICSharpCode.Profiler.AddIn.Views view.Reporter = new ErrorReporter(UpdateErrorList); view.Provider = provider; view.Translation = translation; - view.SetRange(this.timeLine2.SelectedStartIndex, this.timeLine2.SelectedEndIndex); + view.SetRange(this.timeLine.SelectedStartIndex, this.timeLine.SelectedEndIndex); view.ContextMenuOpening += delegate(object sender, ContextMenuEventArgs e) { object source = (e.OriginalSource is Shape) ? e.OriginalSource : view; MenuService.CreateContextMenu(source, "/AddIns/Profiler/QueryView/ContextMenu").IsOpen = true; @@ -84,9 +84,9 @@ namespace ICSharpCode.Profiler.AddIn.Views void DoSelectAll() { - if (this.timeLine2.IsEnabled) { - this.timeLine2.SelectedStartIndex = 0; - this.timeLine2.SelectedEndIndex = this.timeLine2.Provider.DataSets.Count; + if (this.timeLine.IsEnabled) { + this.timeLine.SelectedStartIndex = 0; + this.timeLine.SelectedEndIndex = this.timeLine.Provider.DataSets.Count - 1; } } @@ -98,7 +98,7 @@ namespace ICSharpCode.Profiler.AddIn.Views void CanDoSelectAll(CanExecuteRoutedEventArgs e) { - e.CanExecute = this.timeLine2.IsEnabled && this.timeLine2.Provider.DataSets.Count > 0; + e.CanExecute = this.timeLine.IsEnabled && this.timeLine.Provider.DataSets.Count > 0; } void CloseButtonClick(object sender, RoutedEventArgs e) @@ -191,7 +191,7 @@ namespace ICSharpCode.Profiler.AddIn.Views view.Provider = this.provider; view.Reporter = new ErrorReporter(UpdateErrorList); - view.SetRange(this.timeLine2.SelectedStartIndex, this.timeLine2.SelectedEndIndex); + view.SetRange(this.timeLine.SelectedStartIndex, this.timeLine.SelectedEndIndex); view.CurrentQuery = query; view.ShowQueryItems = true; diff --git a/src/AddIns/Misc/Profiler/Frontend/Controls/TimeLineControl.cs b/src/AddIns/Misc/Profiler/Frontend/Controls/TimeLineControl.cs index efc2770d0c..019ee56ea4 100644 --- a/src/AddIns/Misc/Profiler/Frontend/Controls/TimeLineControl.cs +++ b/src/AddIns/Misc/Profiler/Frontend/Controls/TimeLineControl.cs @@ -291,7 +291,7 @@ namespace ICSharpCode.Profiler.Controls int TransformToIndex(Point point, out bool valid) { int value = (int)Math.Floor(point.X / this.pieceWidth); - valid = (0 <= value && value <= this.valuesList.Count - 1); + valid = (0 >= value && value <= this.valuesList.Count - 1); return Math.Min(Math.Max(0, value), this.valuesList.Count - 1); } diff --git a/src/AddIns/Misc/Profiler/Hook/Profiler.cpp b/src/AddIns/Misc/Profiler/Hook/Profiler.cpp index d2b0c80aa7..7ed0d5b61a 100644 --- a/src/AddIns/Misc/Profiler/Hook/Profiler.cpp +++ b/src/AddIns/Misc/Profiler/Hook/Profiler.cpp @@ -615,7 +615,7 @@ void CProfiler::Rewrite(FunctionID functionID, int type, int nameId) byte *codeBuf = 0; - codeBuf = (byte *)allocator->Alloc(length + 64); + codeBuf = (byte *)allocator->Alloc(length + 128); allocator->Release(); if (codeBuf == nullptr)