Skip to content

Commit 3c81916

Browse files
author
Mike McLaughlin
committed
Misc doc and version updates for preview5.
Reconcile dotnet-dump spec/implementation. Issue #126.
1 parent 69eb802 commit 3c81916

File tree

4 files changed

+96
-43
lines changed

4 files changed

+96
-43
lines changed

documentation/design-docs/dotnet-tools.md

Lines changed: 87 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -410,55 +410,66 @@ COMMANDS
410410

411411
COLLECT
412412

413-
dotnet-dump collect -p|--process-id <pid>
414-
[-h|--help]
415-
[-o|--output <output_dump_path>]
416-
[--type <dump_type>]
413+
dotnet-dump collect -p|--process-id <pid> [-h|--help] [-o|--output <output_dump_path>] [--type <dump_type>]
417414

418-
Capture one or more dumps (core files on Mac/Linux) from a process
415+
Capture dumps (core files on Mac/Linux) from a process
419416

420-
-p, --process-id
421-
The process to collect a memory dump from.
422-
423-
-h, --help
424-
Show command line help
417+
Usage:
418+
dotnet-dump collect [options]
425419

426-
-o, --output
427-
The path where collected dumps should be written. Defaults to '.\dump_YYYYMMDD_HHMMSS.dmp' on Windows and
428-
'./core_YYYYMMDD_HHMMSS' on Linux where YYYYMMDD is Year/Month/Day and HHMMSS is Hour/Minute/Second. Otherwise, it is the full
429-
path and file name of the dump.
430-
431-
--type
432-
The dump type determines the kinds of information that are collected from the process. There are two types:
433-
heap - A large and relatively comprehensive dump containing module lists, thread lists, all stacks,
434-
exception information, handle information, and all memory except for mapped images.
435-
mini - A small dump containing module lists, thread lists, exception information and all stacks.
420+
Options:
421+
-p, --process-id
422+
The process to collect a memory dump from.
423+
424+
-h, --help
425+
Show command line help
436426

437-
If not specified 'heap' is the default.
427+
-o, --output
428+
The path where collected dumps should be written. Defaults to '.\dump_YYYYMMDD_HHMMSS.dmp' on Windows and
429+
'./core_YYYYMMDD_HHMMSS' on Linux where YYYYMMDD is Year/Month/Day and HHMMSS is Hour/Minute/Second. Otherwise, it is the full
430+
path and file name of the dump.
438431

432+
--type
433+
The dump type determines the kinds of information that are collected from the process. There are two types:
434+
heap - A large and relatively comprehensive dump containing module lists, thread lists, all stacks,
435+
exception information, handle information, and all memory except for mapped images.
436+
mini - A small dump containing module lists, thread lists, exception information and all stacks.
439437

440-
Examples:
438+
If not specified 'heap' is the default.
441439

442-
$ dotnet dump collect --process-id 1902 --type mini
443-
Writing minidump to file ./core_20190226_135837
444-
Written 98983936 bytes (24166 pages) to core file
445-
Complete
440+
Examples:
446441

447-
$ dotnet dump collect --process-id 1902 --type mini
448-
Writing minidump to file ./core_20190226_135850
449-
Written 98959360 bytes (24160 pages) to core file
450-
Complete
442+
$ dotnet dump collect --process-id 1902 --type mini
443+
Writing minidump to file ./core_20190226_135837
444+
Written 98983936 bytes (24166 pages) to core file
445+
Complete
446+
447+
$ dotnet dump collect --process-id 1902 --type mini
448+
Writing minidump to file ./core_20190226_135850
449+
Written 98959360 bytes (24160 pages) to core file
450+
Complete
451451

452452
ANALYZE
453453

454-
dotnet-dump analyze [-h|--help] dump_path
454+
dotnet-dump analyze [-h|--help] [-c|--command <command>] dump_path
455455

456456
Starts an interactive shell with debugging commands to explore a dump
457457

458-
dump_path
459-
The dump to analyze
458+
Usage:
459+
dotnet-dump analyze [options] <dump_path>
460+
461+
Arguments:
462+
<dump_path> Name of the dump file to analyze.
463+
464+
Options:
465+
-h, --help
466+
Show command line help
467+
468+
-c, --command <command>
469+
Run the command on start.
470+
471+
Examples:
460472

461-
Examples:
462473
$ dotnet-dump analyze ./core_20190226_135850
463474
Loading core dump: ./core_20190226_135850
464475
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
468479

469480
### dotnet-dump analyze nested command syntax
470481

471-
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:
472-
482+
The following commands are supported:
483+
484+
```
485+
exit, quit Exit interactive mode.
486+
help <command> Display help for a command.
487+
lm, modules Displays the native modules in the process.
488+
threads, setthread <threadid> Sets or displays the current thread id for the SOS commands.
489+
clrstack <arguments> Provides a stack trace of managed code only.
490+
clrthreads <arguments> List the managed threads running.
491+
dumpasync <arguments> Displays info about async state machines on the garbage-collected heap.
492+
dumpassembly <arguments> Displays details about an assembly.
493+
dumpclass <arguments> Displays information about a EE class structure at the specified address.
494+
dumpdelegate <arguments> Displays information about a delegate.
495+
dumpdomain <arguments> Displays information all the AppDomains and all assemblies within the domains.
496+
dumpheap <arguments> Displays info about the garbage-collected heap and collection statistics about objects.
497+
dumpil <arguments> Displays the Microsoft intermediate language (MSIL) that is associated with a managed method.
498+
dumplog <arguments> Writes the contents of an in-memory stress log to the specified file.
499+
dumpmd <arguments> Displays information about a MethodDesc structure at the specified address.
500+
dumpmodule <arguments> Displays information about a EE module structure at the specified address.
501+
dumpmt <arguments> Displays information about a method table at the specified address.
502+
dumpobj <arguments> Displays info about an object at the specified address.
503+
dso, dumpstackobjects <arguments> Displays all managed objects found within the bounds of the current stack.
504+
eeheap <arguments> Displays info about process memory consumed by internal runtime data structures.
505+
finalizequeue <arguments> Displays all objects registered for finalization.
506+
gcroot <arguments> Displays info about references (or roots) to an object at the specified address.
507+
gcwhere <arguments> Displays the location in the GC heap of the argument passed in.
508+
ip2md <arguments> Displays the MethodDesc structure at the specified address in code that has been JIT-compiled.
509+
name2ee <arguments> Displays the MethodTable structure and EEClass structure for the specified type or method in the specified module.
510+
pe, printexception <arguments> Displays and formats fields of any object derived from the Exception class at the specified address.
511+
syncblk <arguments> Displays the SyncBlock holder info.
512+
histclear <arguments> Releases any resources used by the family of Hist commands.
513+
histinit <arguments> Initializes the SOS structures from the stress log saved in the debuggee.
514+
histobj <arguments> 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.
515+
histobjfind <arguments> Displays all the log entries that reference an object at the specified address.
516+
histroot <arguments> Displays information related to both promotions and relocations of the specified root.
517+
setsymbolserver <arguments> Enables the symbol server support.
518+
```
519+
520+
The "modules", "threads" and "setthread" commands display/control the native state.
521+
522+
In addition new commands are listed below:
523+
473524
GCHEAPDIFF
474525

475526
gcheapdiff <path_to_baseline_dump>

documentation/dotnet-dump-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The next step is to collect a dump. This can be skipped if a core dump has alrea
1717

1818
On Linux, it needs to be run as superuser:
1919

20-
$ sudo -E dotnet dump collect --process-id 1902
20+
$ sudo -E PATH=$PATH dotnet dump collect --process-id 1902
2121
Writing minidump to file ./core_20190226_135837
2222
Written 98983936 bytes (24166 pages) to core file
2323
Complete

documentation/lldb/osx-instructions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ MacOS
33

44
### MacOS (Sierra 10.12.6) Instructions
55

6-
The version of lldb that comes with Xcode 9.2 will now work with SOS. We no longer have to build lldb locally.
6+
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.
77

88
### MacOS (High Sierra 10.13.4) Instructions
99

10-
Xcode 9.2/9.3 swift-4.1
10+
The version of lldb that comes with Xcode 9.3/9.4 swift-4.1 will now work with SOS and the lldb plugin.
1111

12-
[TBD]
12+
### MacOS (Mojave 10.14) Instructions
13+
14+
There has been no testing for the version of Xcode/lldb that comes with Mojave.

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<PropertyGroup>
44
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
55

6-
<VersionPrefix>1.0.2</VersionPrefix>
7-
<PreReleaseVersionLabel>preview3</PreReleaseVersionLabel>
6+
<VersionPrefix>1.0.3</VersionPrefix>
7+
<PreReleaseVersionLabel>preview5</PreReleaseVersionLabel>
88

99
<!-- Opt-out repo features -->
1010
<UsingToolXliff>false</UsingToolXliff>
@@ -19,7 +19,7 @@
1919
<MicrosoftWin32PrimitivesVersion>4.3.0</MicrosoftWin32PrimitivesVersion>
2020

2121
<!-- Other libs -->
22-
<MicrosoftSymbolStoreVersion>1.0.0-dev-63716-01</MicrosoftSymbolStoreVersion>
22+
<MicrosoftSymbolStoreVersion>1.0.0-dev-64016-01</MicrosoftSymbolStoreVersion>
2323
<MicrosoftDiagnosticsRuntimeVersion>1.0.5</MicrosoftDiagnosticsRuntimeVersion>
2424
</PropertyGroup>
2525

0 commit comments

Comments
 (0)