Repository navigation
Various misc fixes and cleanup - #5421
Conversation
Use IHost temp directory in symbol service
…reateModule call Move/rename ManagedImageMappingModuleService into ImageMappingMemoryService class
Fix issue in `sethostruntime` command. Don't print 0.0 for the runtime version.
2c1cc94 to
e20e9b7
Compare
noahfalk
left a comment
There was a problem hiding this comment.
A few suggestions inline where I think we've got opportunity to simplify
There was a problem hiding this comment.
Pull Request Overview
This PR applies several miscellaneous fixes and cleanup improvements across extension commands and core services, addressing issues from help documentation to module creation and symbol processing. Key changes include the addition of detailed help text for various commands, removal of obsolete APIs and services, and improved handling for temporary directories and module validations.
Reviewed Changes
Copilot reviewed 53 out of 54 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Diagnostics.ExtensionCommands/EEHeapCommand.cs | Added detailed help text for the eeheap command. |
| src/Microsoft.Diagnostics.ExtensionCommands/DumpStackObjectsCommand.cs | Added detailed help text for the dumpstackobjects command. |
| src/Microsoft.Diagnostics.ExtensionCommands/DumpRuntimeTypeCommand.cs | Added detailed help text for runtime type dumping and clarified output information. |
| src/Microsoft.Diagnostics.ExtensionCommands/DumpHeapCommand.cs | Extended detailed help text with examples and discussion of GC heap fragmentation. |
| src/Microsoft.Diagnostics.ExtensionCommands/DumpGenCommand.cs | Updated help examples for the dumpgen command. |
| src/Microsoft.Diagnostics.ExtensionCommands/DumpConcurrentQueueCommand.cs | Enhanced help text for the dump concurrent queue command. |
| src/Microsoft.Diagnostics.ExtensionCommands/DumpConcurrentDictionaryCommand.cs | Enhanced help text for the dump concurrent dictionary command. |
| src/Microsoft.Diagnostics.ExtensionCommands/AnalyzeOOMCommand.cs | Added detailed help text for analyzing managed OOM scenarios. |
| src/Microsoft.Diagnostics.DebugServices/ISymbolService.cs | Removed the obsolete GetMetadata method. |
| src/Microsoft.Diagnostics.DebugServices/IModuleService.cs | Updated CreateModule signature with improved documentation and parameter validation. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/Utilities.cs | Added an extension method for creating modules from ClrModule instances. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/SymbolService.cs | Updated symbol file downloading to use the host-specific temporary directory. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/ModuleService.cs | Added checks in CreateModule to throw on invalid module parameters. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/Module.cs | Updated GetMetadata to use new syntax for returning an empty array. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/MetadataMappingMemoryService.cs | Revised metadata retrieval to utilize the new IModuleService.CreateModule call. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/ManagedImageMappingModuleService.cs | Removed the ManagedImageMappingModuleService in favour of a new approach. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/ImageMappingMemoryService.cs | Changed module service initialization and enhanced temporary directory handling. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/Host.cs | Improved temporary directory path determination based on host OS. |
| src/Microsoft.Diagnostics.DebugServices.Implementation/CommandService.cs | Improved help context construction and replaced placeholder prompts with host-specific ones. |
Files not reviewed (1)
- eng/Versions.props: Language not supported
Comments suppressed due to low confidence (2)
src/Microsoft.Diagnostics.ExtensionCommands/DumpHeapCommand.cs:171
- Replace "it's" with "its" to correctly use the possessive form.
Dumpheap is a powerful command that traverses the garbage collected heap, collection statistics about objects. With it's various options, it can look for
src/Microsoft.Diagnostics.DebugServices.Implementation/Module.cs:210
- Ensure that the new empty array literal syntax returns an ImmutableArray as expected; consider reverting to ImmutableArray.Empty if compatibility issues arise.
return [];
tommcdon
left a comment
There was a problem hiding this comment.
Left a couple comments for your consideration otherwise LGTM!
## Problem In the past SOS.OtherCommands test was failing on Alpine Linux with error: ``` System.Exception : VerifyOutput: no last command output or debugger exited unexpectedly: \s*Name:\s+SymbolTestApp.Program\s+ ``` We believe the issue was resolved in #5421 but the tests had never been re-enabled. This PR re-enables the test. Fixes #4654. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: noahfalk <[email protected]>
This PR is broken down into individual commits for:
sethostruntimecommand. Don't print 0.0 for the runtime version. Help diagnose host runtime problems in the future.