From bccf8b8dd318dc3dee3ce6df6e5fc60b41dd4d92 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 19 Sep 2009 00:10:54 +0000 Subject: [PATCH] - added WPF assembly key for "Do not profile .NET internals" - fixed hot path selection git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4968 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Frontend/Controls/QueryView.xaml.cs | 8 ++++---- .../Misc/Profiler/Hook/ProfilerMetaData.cpp | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml.cs b/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml.cs index 0ac80e8f2f..d90266d9dd 100644 --- a/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml.cs +++ b/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml.cs @@ -308,17 +308,17 @@ namespace ICSharpCode.Profiler.Controls void BtnExpandHotPathSubtreeClick(object sender, RoutedEventArgs e) { foreach (CallTreeNodeViewModel node in this.SelectedItems.ToArray()) { - ExpandHotPathItems(node); + ExpandHotPathItems(node, node); } } - void ExpandHotPathItems(CallTreeNodeViewModel parent) + void ExpandHotPathItems(CallTreeNodeViewModel parent, CallTreeNodeViewModel selectedRoot) { - if (parent.HotPathIndicatorVisibility == Visibility.Visible) { + if ((parent.CpuCyclesSpent / (double)selectedRoot.CpuCyclesSpent) >= 0.2) { parent.IsExpanded = true; foreach (CallTreeNodeViewModel node in parent.Children) - ExpandHotPathItems(node); + ExpandHotPathItems(node, selectedRoot); } } diff --git a/src/AddIns/Misc/Profiler/Hook/ProfilerMetaData.cpp b/src/AddIns/Misc/Profiler/Hook/ProfilerMetaData.cpp index d90fd05df0..a3dd180da6 100644 --- a/src/AddIns/Misc/Profiler/Hook/ProfilerMetaData.cpp +++ b/src/AddIns/Misc/Profiler/Hook/ProfilerMetaData.cpp @@ -528,8 +528,10 @@ bool SignatureReader::ReadCompressedInt(int *out) return true; } +// public key token: b77a5c561934e089 const byte mscorlibkey[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +// public key token: b03f5f7f11d50a3a const byte systemdrawingkey[] = { 0x00, 0x24, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x31, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x07, 0xD1, @@ -543,6 +545,20 @@ const byte systemdrawingkey[] = { 0xC0, 0x93, 0x34, 0x4D, 0x5A, 0xD2, 0x93 }; +// public key token: 31bf3856ad364e35 +const byte wpfassemblieskey[] = { + 0x00, 0x24, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x31, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0xB5, 0xFC, + 0x90, 0xE7, 0x02, 0x7F, 0x67, 0x87, 0x1E, 0x77, 0x3A, 0x8F, 0xDE, 0x89, 0x38, 0xC8, 0x1D, 0xD4, 0x02, + 0xBA, 0x65, 0xB9, 0x20, 0x1D, 0x60, 0x59, 0x3E, 0x96, 0xC4, 0x92, 0x65, 0x1E, 0x88, 0x9C, 0xC1, 0x3F, + 0x14, 0x15, 0xEB, 0xB5, 0x3F, 0xAC, 0x11, 0x31, 0xAE, 0x0B, 0xD3, 0x33, 0xC5, 0xEE, 0x60, 0x21, 0x67, + 0x2D, 0x97, 0x18, 0xEA, 0x31, 0xA8, 0xAE, 0xBD, 0x0D, 0xA0, 0x07, 0x2F, 0x25, 0xD8, 0x7D, 0xBA, 0x6F, + 0xC9, 0x0F, 0xFD, 0x59, 0x8E, 0xD4, 0xDA, 0x35, 0xE4, 0x4C, 0x39, 0x8C, 0x45, 0x43, 0x07, 0xE8, 0xE3, + 0x3B, 0x84, 0x26, 0x14, 0x3D, 0xAE, 0xC9, 0xF5, 0x96, 0x83, 0x6F, 0x97, 0xC8, 0xF7, 0x47, 0x50, 0xE5, + 0x97, 0x5C, 0x64, 0xE2, 0x18, 0x9F, 0x45, 0xDE, 0xF4, 0x6B, 0x2A, 0x2B, 0x12, 0x47, 0xAD, 0xC3, 0x65, + 0x2B, 0xF5, 0xC3, 0x08, 0x05, 0x5D, 0xA9 +}; + bool SignatureReader::IsNetInternal(FunctionID fid) { @@ -567,6 +583,8 @@ bool SignatureReader::IsNetInternal(FunctionID fid) return true; if (pKLength == sizeof(systemdrawingkey) && memcmp(systemdrawingkey, b, sizeof(systemdrawingkey)) == 0) return true; + if (pKLength == sizeof(wpfassemblieskey) && memcmp(wpfassemblieskey, b, sizeof(wpfassemblieskey)) == 0) + return true; } }