Skip to content

Commit

Permalink
Merge pull request #1058 from mikem8361/release/stable
Browse files Browse the repository at this point in the history
Port dotnet-dump modules perf fix to release/stable
  • Loading branch information
mikem8361 authored Apr 23, 2020
2 parents 4de63e6 + 505284c commit 2c03f4e
Show file tree
Hide file tree
Showing 10 changed files with 369 additions and 346 deletions.
6 changes: 5 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
<SystemCollectionsImmutableVersion>1.5.0</SystemCollectionsImmutableVersion>
<MicrosoftWin32PrimitivesVersion>4.3.0</MicrosoftWin32PrimitivesVersion>
<!-- Other libs -->
<MicrosoftDiagnosticsRuntimeVersion>1.1.116301</MicrosoftDiagnosticsRuntimeVersion>
<MicrosoftAspNetCoreVersion>2.1.7</MicrosoftAspNetCoreVersion>
<MicrosoftAspNetCoreHttpsPolicyVersion>2.1.1</MicrosoftAspNetCoreHttpsPolicyVersion>
<MicrosoftAspNetCoreMvcVersion>2.1.3</MicrosoftAspNetCoreMvcVersion>
<MicrosoftAspNetCoreResponseCompressionVersion>2.1.1</MicrosoftAspNetCoreResponseCompressionVersion>
<MicrosoftDiagnosticsRuntimeVersion>1.1.122004</MicrosoftDiagnosticsRuntimeVersion>
<MicrosoftDiaSymReaderNativePackageVersion>1.7.0</MicrosoftDiaSymReaderNativePackageVersion>
<MicrosoftDiagnosticsTracingTraceEventVersion>2.0.51</MicrosoftDiagnosticsTracingTraceEventVersion>
<MicrosoftExtensionsConfigurationJsonVersion>3.1.2</MicrosoftExtensionsConfigurationJsonVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/SOS/SOS.Hosting/dbgeng/DebugAdvanced.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ internal DebugAdvanced(DebugClient client, SOSHost soshost)

#region IDebugAdvanced Delegates

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetThreadContextDelegate(
[In] IntPtr self,
[In] IntPtr context,
[In] uint contextSize);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetThreadContextDelegate(
[In] IntPtr self,
[In] IntPtr context,
Expand Down
90 changes: 45 additions & 45 deletions src/SOS/SOS.Hosting/dbgeng/DebugClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,59 +106,59 @@ internal static int NotImplemented

#region IDebugClient Delegates

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int AttachKernelDelegate(
IntPtr self,
[In] DEBUG_ATTACH flags,
[In][MarshalAs(UnmanagedType.LPStr)] string connectOptions);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetKernelConnectionOptionsDelegate(
IntPtr self,
[Out][MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] uint* OptionsSize);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetKernelConnectionOptionsDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.LPStr)] string Options);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int StartProcessServerDelegate(
IntPtr self,
[In] DEBUG_CLASS Flags,
[In][MarshalAs(UnmanagedType.LPStr)] string Options,
[In] IntPtr Reserved);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int ConnectProcessServerDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.LPStr)] string RemoteOptions,
[Out] ulong* Server);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int DisconnectProcessServerDelegate(
IntPtr self,
[In] ulong Server);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetRunningProcessSystemIdsDelegate(
IntPtr self,
[In] ulong Server,
[Out] uint* Ids,
[In] uint Count,
[Out] uint* ActualCount);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetRunningProcessSystemIdByExecutableNameDelegate(
IntPtr self,
[In] ulong Server,
[In][MarshalAs(UnmanagedType.LPStr)] string ExeName,
[In] DEBUG_GET_PROC Flags,
[Out] uint* Id);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetRunningProcessDescriptionDelegate(
IntPtr self,
[In] ulong Server,
Expand All @@ -171,21 +171,21 @@ private delegate int GetRunningProcessDescriptionDelegate(
[In] int DescriptionSize,
[Out] uint* ActualDescriptionSize);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int AttachProcessDelegate(
IntPtr self,
[In] ulong Server,
[In] uint ProcessID,
[In] DEBUG_ATTACH AttachFlags);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int CreateProcessDelegate(
IntPtr self,
[In] ulong Server,
[In][MarshalAs(UnmanagedType.LPStr)] string CommandLine,
[In] DEBUG_CREATE_PROCESS Flags);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int CreateProcessAndAttachDelegate(
IntPtr self,
[In] ulong Server,
Expand All @@ -194,164 +194,164 @@ private delegate int CreateProcessAndAttachDelegate(
[In] uint ProcessId,
[In] DEBUG_ATTACH AttachFlags);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetProcessOptionsDelegate(
IntPtr self,
[Out] DEBUG_PROCESS* Options);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int AddProcessOptionsDelegate(
IntPtr self,
[In] DEBUG_PROCESS Options);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int RemoveProcessOptionsDelegate(
IntPtr self,
[In] DEBUG_PROCESS Options);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetProcessOptionsDelegate(
IntPtr self,
[In] DEBUG_PROCESS Options);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int OpenDumpFileDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.LPStr)] string DumpFile);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int WriteDumpFileDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.LPStr)] string DumpFile,
[In] DEBUG_DUMP Qualifier);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int ConnectSessionDelegate(
IntPtr self,
[In] DEBUG_CONNECT_SESSION Flags,
[In] uint HistoryLimit);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int StartServerDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.LPStr)] string Options);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int OutputServerDelegate(
IntPtr self,
[In] DEBUG_OUTCTL OutputControl,
[In][MarshalAs(UnmanagedType.LPStr)] string Machine,
[In] DEBUG_SERVERS Flags);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int TerminateProcessesDelegate(
IntPtr self);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int DetachProcessesDelegate(
IntPtr self);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int EndSessionDelegate(
IntPtr self,
[In] DEBUG_END Flags);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetExitCodeDelegate(
IntPtr self,
[Out] uint* Code);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int DispatchCallbacksDelegate(
IntPtr self,
[In] uint Timeout);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int ExitDispatchDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.Interface)] IDebugClient Client);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int CreateClientDelegate(
IntPtr self,
[Out][MarshalAs(UnmanagedType.Interface)] IntPtr Client); // out IDebugClient

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetInputCallbacksDelegate(
IntPtr self,
[Out][MarshalAs(UnmanagedType.Interface)] IntPtr Callbacks); // out IDebugInputCallbacks

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetInputCallbacksDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.Interface)] IDebugInputCallbacks Callbacks);

/* GetOutputCallbacks could a conversion thunk from the debugger engine so we can't specify a specific interface */

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetOutputCallbacksDelegate(
IntPtr self,
[Out] IntPtr Callbacks); // out IDebugOutputCallbacks

/* We may have to pass a debugger engine conversion thunk back in so we can't specify a specific interface */

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetOutputCallbacksDelegate(
IntPtr self,
[In] IDebugOutputCallbacks Callbacks);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetOutputMaskDelegate(
IntPtr self,
[Out] DEBUG_OUTPUT* Mask);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetOutputMaskDelegate(
IntPtr self,
[In] DEBUG_OUTPUT Mask);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetOtherOutputMaskDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.Interface)] IDebugClient Client,
[Out] DEBUG_OUTPUT* Mask);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetOtherOutputMaskDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.Interface)] IDebugClient Client,
[In] DEBUG_OUTPUT Mask);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetOutputWidthDelegate(
IntPtr self,
[Out] uint* Columns);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetOutputWidthDelegate(
IntPtr self,
[In] uint Columns);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetOutputLinePrefixDelegate(
IntPtr self,
[Out][MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] uint* PrefixSize);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetOutputLinePrefixDelegate(
IntPtr self,
[In][MarshalAs(UnmanagedType.LPStr)] string Prefix);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetIdentityDelegate(
IntPtr self,
[Out][MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] uint* IdentitySize);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int OutputIdentityDelegate(
IntPtr self,
[In] DEBUG_OUTCTL OutputControl,
Expand All @@ -360,19 +360,19 @@ private delegate int OutputIdentityDelegate(

/* GetEventCallbacks could a conversion thunk from the debugger engine so we can't specify a specific interface */

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int GetEventCallbacksDelegate(
IntPtr self,
[Out] IntPtr Callbacks); // out IDebugEventCallbacks

/* We may have to pass a debugger engine conversion thunk back in so we can't specify a specific interface */

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int SetEventCallbacksDelegate(
IntPtr self,
[In] IDebugEventCallbacks Callbacks);

[UnmanagedFunctionPointer(CallingConvention.StdCall)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate int FlushCallbacksDelegate(
IntPtr self);

Expand Down
Loading

0 comments on commit 2c03f4e

Please sign in to comment.