From 3c819169da4d87dca7dd9b7d2f116242cc07dd79 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Tue, 16 Apr 2019 15:08:01 -0700 Subject: [PATCH] Misc doc and version updates for preview5. Reconcile dotnet-dump spec/implementation. Issue #126. --- documentation/design-docs/dotnet-tools.md | 123 +++++++++++++++------- documentation/dotnet-dump-instructions.md | 2 +- documentation/lldb/osx-instructions.md | 8 +- eng/Versions.props | 6 +- 4 files changed, 96 insertions(+), 43 deletions(-) diff --git a/documentation/design-docs/dotnet-tools.md b/documentation/design-docs/dotnet-tools.md index b04c01618..47ea98d54 100644 --- a/documentation/design-docs/dotnet-tools.md +++ b/documentation/design-docs/dotnet-tools.md @@ -410,55 +410,66 @@ COMMANDS COLLECT - dotnet-dump collect -p|--process-id - [-h|--help] - [-o|--output ] - [--type ] + dotnet-dump collect -p|--process-id [-h|--help] [-o|--output ] [--type ] - Capture one or more dumps (core files on Mac/Linux) from a process + Capture dumps (core files on Mac/Linux) from a process - -p, --process-id - The process to collect a memory dump from. - - -h, --help - Show command line help + Usage: + dotnet-dump collect [options] - -o, --output - The path where collected dumps should be written. Defaults to '.\dump_YYYYMMDD_HHMMSS.dmp' on Windows and - './core_YYYYMMDD_HHMMSS' on Linux where YYYYMMDD is Year/Month/Day and HHMMSS is Hour/Minute/Second. Otherwise, it is the full - path and file name of the dump. - - --type - The dump type determines the kinds of information that are collected from the process. There are two types: - heap - A large and relatively comprehensive dump containing module lists, thread lists, all stacks, - exception information, handle information, and all memory except for mapped images. - mini - A small dump containing module lists, thread lists, exception information and all stacks. + Options: + -p, --process-id + The process to collect a memory dump from. + + -h, --help + Show command line help - If not specified 'heap' is the default. + -o, --output + The path where collected dumps should be written. Defaults to '.\dump_YYYYMMDD_HHMMSS.dmp' on Windows and + './core_YYYYMMDD_HHMMSS' on Linux where YYYYMMDD is Year/Month/Day and HHMMSS is Hour/Minute/Second. Otherwise, it is the full + path and file name of the dump. + --type + The dump type determines the kinds of information that are collected from the process. There are two types: + heap - A large and relatively comprehensive dump containing module lists, thread lists, all stacks, + exception information, handle information, and all memory except for mapped images. + mini - A small dump containing module lists, thread lists, exception information and all stacks. - Examples: + If not specified 'heap' is the default. - $ dotnet dump collect --process-id 1902 --type mini - Writing minidump to file ./core_20190226_135837 - Written 98983936 bytes (24166 pages) to core file - Complete +Examples: - $ dotnet dump collect --process-id 1902 --type mini - Writing minidump to file ./core_20190226_135850 - Written 98959360 bytes (24160 pages) to core file - Complete + $ dotnet dump collect --process-id 1902 --type mini + Writing minidump to file ./core_20190226_135837 + Written 98983936 bytes (24166 pages) to core file + Complete + + $ dotnet dump collect --process-id 1902 --type mini + Writing minidump to file ./core_20190226_135850 + Written 98959360 bytes (24160 pages) to core file + Complete ANALYZE - dotnet-dump analyze [-h|--help] dump_path + dotnet-dump analyze [-h|--help] [-c|--command ] dump_path Starts an interactive shell with debugging commands to explore a dump - dump_path - The dump to analyze + Usage: + dotnet-dump analyze [options] + + Arguments: + Name of the dump file to analyze. + + Options: + -h, --help + Show command line help + + -c, --command + Run the command on start. + +Examples: - Examples: $ dotnet-dump analyze ./core_20190226_135850 Loading core dump: ./core_20190226_135850 Ready to process analysis commands. Type 'help' to list available commands or 'help [command]' to get detailed help on a command. @@ -468,8 +479,48 @@ ANALYZE ### dotnet-dump analyze nested command syntax -By default these commands should come from SOS and include at least help, dumpheap, dumpobject, dumparray, and printexception. If we can get more easily we should. In addition new commands are listed below: - +The following commands are supported: + +``` + exit, quit Exit interactive mode. + help Display help for a command. + lm, modules Displays the native modules in the process. + threads, setthread Sets or displays the current thread id for the SOS commands. + clrstack Provides a stack trace of managed code only. + clrthreads List the managed threads running. + dumpasync Displays info about async state machines on the garbage-collected heap. + dumpassembly Displays details about an assembly. + dumpclass Displays information about a EE class structure at the specified address. + dumpdelegate Displays information about a delegate. + dumpdomain Displays information all the AppDomains and all assemblies within the domains. + dumpheap Displays info about the garbage-collected heap and collection statistics about objects. + dumpil Displays the Microsoft intermediate language (MSIL) that is associated with a managed method. + dumplog Writes the contents of an in-memory stress log to the specified file. + dumpmd Displays information about a MethodDesc structure at the specified address. + dumpmodule Displays information about a EE module structure at the specified address. + dumpmt Displays information about a method table at the specified address. + dumpobj Displays info about an object at the specified address. + dso, dumpstackobjects Displays all managed objects found within the bounds of the current stack. + eeheap Displays info about process memory consumed by internal runtime data structures. + finalizequeue Displays all objects registered for finalization. + gcroot Displays info about references (or roots) to an object at the specified address. + gcwhere Displays the location in the GC heap of the argument passed in. + ip2md Displays the MethodDesc structure at the specified address in code that has been JIT-compiled. + name2ee Displays the MethodTable structure and EEClass structure for the specified type or method in the specified module. + pe, printexception Displays and formats fields of any object derived from the Exception class at the specified address. + syncblk Displays the SyncBlock holder info. + histclear Releases any resources used by the family of Hist commands. + histinit Initializes the SOS structures from the stress log saved in the debuggee. + histobj Examines all stress log relocation records and displays the chain of garbage collection relocations that may have led to the address passed in as an argument. + histobjfind Displays all the log entries that reference an object at the specified address. + histroot Displays information related to both promotions and relocations of the specified root. + setsymbolserver Enables the symbol server support. + ``` + +The "modules", "threads" and "setthread" commands display/control the native state. + +In addition new commands are listed below: + GCHEAPDIFF gcheapdiff diff --git a/documentation/dotnet-dump-instructions.md b/documentation/dotnet-dump-instructions.md index 7ffcbc053..b3ecca491 100644 --- a/documentation/dotnet-dump-instructions.md +++ b/documentation/dotnet-dump-instructions.md @@ -17,7 +17,7 @@ The next step is to collect a dump. This can be skipped if a core dump has alrea On Linux, it needs to be run as superuser: - $ sudo -E dotnet dump collect --process-id 1902 + $ sudo -E PATH=$PATH dotnet dump collect --process-id 1902 Writing minidump to file ./core_20190226_135837 Written 98983936 bytes (24166 pages) to core file Complete diff --git a/documentation/lldb/osx-instructions.md b/documentation/lldb/osx-instructions.md index cf202feb2..f71001ed9 100644 --- a/documentation/lldb/osx-instructions.md +++ b/documentation/lldb/osx-instructions.md @@ -3,10 +3,12 @@ MacOS ### MacOS (Sierra 10.12.6) Instructions -The version of lldb that comes with Xcode 9.2 will now work with SOS. We no longer have to build lldb locally. +The version of lldb that comes with Xcode 9.2 will now work with SOS and the lldb plugin. We no longer have to build lldb locally. ### MacOS (High Sierra 10.13.4) Instructions -Xcode 9.2/9.3 swift-4.1 +The version of lldb that comes with Xcode 9.3/9.4 swift-4.1 will now work with SOS and the lldb plugin. -[TBD] +### MacOS (Mojave 10.14) Instructions + +There has been no testing for the version of Xcode/lldb that comes with Mojave. diff --git a/eng/Versions.props b/eng/Versions.props index bdeb7c9f2..8c720b41a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -3,8 +3,8 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 1.0.2 - preview3 + 1.0.3 + preview5 false @@ -19,7 +19,7 @@ 4.3.0 - 1.0.0-dev-63716-01 + 1.0.0-dev-64016-01 1.0.5 -- 2.34.1