Граф коммитов

221 Коммитов

Автор SHA1 Сообщение Дата
Rob Paveza 65cf0a0e13
Add JavaScript and WASM symbols conventions (#5096)
These conventions are used by Microsoft Edge to obtain source maps from
Symbol Server. They don't need to be matched precisely but are useful.
2024-12-11 13:51:15 -08:00
Mike McLaughlin 00f385165d
Add enable logging suggestion to FAQ (#5017) 2024-10-22 15:18:03 -07:00
Juan Hoyos f46a5cfed4
Centralize TFM infrastructure (#4971) 2024-10-02 03:13:00 +00:00
Noah Falk 4d71d5b0de
Delete duplicate DiagnosticClient docs (#4970)
DiagnosticClient is documented on our official docs site. Removing the
repo copy which is not receiving updates and would get out-of-sync.

Related to: https://github.com/dotnet/docs/pull/42771
2024-09-30 21:13:50 -07:00
mikelle-rogers 345384d2cf
SOS workarounds for MacOS (#4966)
This work around can be applicable to all MacOS devices. @am11
2024-09-27 11:45:12 -07:00
mikelle-rogers b1a4c22a31
Nit documentation fix (#4963)
@mikem8361 Does this apply to just the M1? Or is it relevant to all
MacOS arm64 machines?
2024-09-26 12:32:35 -07:00
Mike McLaughlin 6cbc47cea7
Update SOS FAQ with MacOS M1 lldb workaround (#4959)
Workaround for issues https://github.com/dotnet/diagnostics/issues/4259
and https://github.com/dotnet/diagnostics/issues/4551.

/cc: @am11, @janvorli, @lambdageek

---------

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
2024-09-26 10:48:51 -07:00
Mike McLaughlin bfb8c3e902
Add PDZ indexing to symbol store (#4907)
Change debug asserts to release argument exceptions for better parameter
validation

---------

Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
2024-09-06 10:27:26 -07:00
Mike McLaughlin bad6880265
Allow SOS testing against a private runtime build (#4818)
Added eng\privatebuild.cmd and eng/privatebuild.sh and some build
changes that sets up for testing against a private build. Just the
latest 9.0.x runtimes are installed and tested against.

Added eng/testsos* as a short cut to running just the SOS tests.

Updated the doc on the end-to-end procedure.
2024-08-02 09:25:05 -07:00
Mike McLaughlin c71692f62a
Implement CLRMA interfaces on top of DAC APIs (#4667)
Add "clrmaconfig" command to control clrma logging, direct DAC and
managed support.

Move SOSExtensions to separate cpp/h files.

Cleanup Extensions::FlushCheck. Needed to call in the clrma code.

INIT_API_EXT macro cleanup: added ExtInit function that does all command
entry init.

Change the no managed hosting fallback code (platform/*) to use the
IDebuggerServices instance instead of the global dbgeng variables
because it is always available/setup. This allows the CLRMA support to
work with no managed code.
2024-07-02 15:17:54 -07:00
Noah Falk 108e221b37
Update ipc-protocol.md (#4658)
Clarifying which keywords on CollectTracing4 produce identical behavior
with the previous CollecTracing commands.
2024-05-10 22:46:22 -07:00
Andrew Au 4e781d09cf
Supports collecting GCSettingsEvent for gc-collect profile (#4615)
This change supports collecting GCSettingsEvent for gc-collect profile.
The change will work for both dotnet-trace and dotnet-monitor.

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
2024-05-10 13:45:10 -07:00
Mike McLaughlin 326ccf39e5
Move the symstore repo to diagnostics (#4603)
This PR moves the main symstore assemblies, tests and dotnet-symbol tool
to the diagnostics repo. It doesn't move the NugetSymbolServer or the
SymClient test tool. Neither are necessary for symbol indexing and
downloading.

The docs/specs were not copied either. I really don't want two copies of
the indexing and download protocol specs.

There is a base line commit that is exactly what is currently in the
symstore repro and several other commits that fix all the coding
convention and analyzer changes required to live in the diagnostics
repo. The only real functional change in
dotnet-symbol/Microsoft.SymbolStore is that ConfigureAwait(false) was
added to all the awaits (I think the default without ConfigureAwait is
true).
2024-04-16 15:56:24 -07:00
Noah Falk 2b1c839936
Update sos.md (#4570)
Get rid of outdated lldb-3.9 instructions
2024-03-29 15:49:23 -07:00
Mike McLaughlin 2be99ebb06
Add SOS !printexception usage details (#4527) 2024-02-26 14:37:36 -08:00
Eugene Zhirov 97de8816f4
Add RequestStackwalk parameter to EventPipeSession (#4290)
Client-side of https://github.com/dotnet/runtime/pull/84077 and the
implementation of https://github.com/dotnet/diagnostics/issues/3696.

To simplify the interface I made `EventPipeSessionConfiguration` public
and introduced a new method in the DiagnosticsClient:
`Task<EventPipeSession>
StartEventPipeSessionAsync(EventPipeSessionConfiguration configuration,
CancellationToken token)`. This is the only method that supports
disabling the stackwalk so no additional overloads with a new bool
parameter and no synchronous counterpart. I believe it'd be easier to
use and maintain a single async method with the options rather than
creating more overloads or default parameters but I may not have all the
context here so please correct me if you think it's a bad idea.

To deal with the backward compatibility I only use `CollectTracingV3`
when necessary i.e. when `RequestStackwalk` option is set to false. I
think it's a good compromise between the added complexity and
potentially surprising behavior:
* when the client is old and the runtime is new everything works because
the runtime supports `CollectTracingV2`
* when the client is new but the runtime is old everything works until
the new option is used. When it's used the session won't start as
`CollectTracingV3` doesn't exist server side: there'd be no clear error
message but it's documented in the option summary.
* when both the client and the runtime are new either `CollectTracingV2`
or `CollectTracingV3` may be used transparently for the user
* we may use the same trick when we introduce `CollectTracingV4`

The alternative is to implement version negotiation of some sort but I'd
like to have your opinion before attempting this as handling the errors
correctly wouldn't be easy (f.e. in [my current
fork](3946b4a88b (diff-e8365039cd36eae3dec611784fc7076be7dadeda1007733412aaaa63f40a748fR39))
I just hide the exception)

The testing turned out to be a bit complex as I needed to convert
EventPipe stream to `TraceLog` to be able to read the stacktraces. I
couldn't achieve that without writing data to a file. Afaiu the
stackwalk may not work correctly without the rundown that only happens
at the end of the session so I wonder if looking at the stacktraces with
a live session is even possible (though iirc netfw+ETW could do that
back in the days) ?

Thanks for your time !
2023-11-21 00:27:55 -08:00
mikelle-rogers a6630008a9
Retire Duplicate Documentation (#4341)
Retire duplicate documentation by redirecting to docs that will be updated.

fixes #515

---------

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
2023-10-19 14:49:51 -07:00
David Mason 3357ebf5f4
Spec for GetProcessInfo3 IPC command (#3476) 2023-09-01 01:37:32 -07:00
Filip Navara 87aec98278
Mention dotnet-heapview as x-plat tool for viewing .gcdump files (#4147) 2023-08-21 15:50:54 -07:00
dotnet-maestro[bot] fda861fe31
[main] Update dependencies from dotnet/arcade (#3993)
[main] Update dependencies from dotnet/arcade
- Coherency Updates:
  - Microsoft.SourceLink.GitHub: from 8.0.0-beta.23252.2 to 8.0.0-beta.23314.2 (parent: Microsoft.DotNet.Arcade.Sdk)

 - Use explicit rollforward 3.1+ config

 - Merge branch 'main' into darc-main-c28d60f4-2132-40e6-952a-725c8be1eece
2023-06-20 19:32:10 +00:00
David Mason d66daf30d2
Perfmaps IPC changes for DiagnosticClient (#3873)
Diagnostic side changes for https://github.com/dotnet/runtime/pull/85801
2023-06-17 07:21:38 +00:00
Justin Anderson d3fae1c9cf
ApplyStartupHook diagnostic IPC command (#3918) 2023-06-13 20:02:38 -07:00
Mike McLaughlin ea4673b51b
Add AssemblyLoadContext for loading extensions (#3649)
* Add AssemblyLoadContext for loading extensions

Add and use ServiceManager.NotifyExtensionLoadFailure event.

Replace Provider scope with ProviderExport attribute

Removing the DAC or DBI check in GetLocalPath() keeps invalid DACs or DBIs
from being loaded if in the current directory. The download path will find
a DAC in the same directory as the core dump when under dotnet-dump.

Update extensibility doc

* Update to 7.0.3 and 6.0.14

* Change the context service ordering to prevent creating runtimes if not needed

* Fix analyzer issues

* Fix overflow in WebApp tests

* Code review feedback

* Fix desktop SOS tests
2023-03-15 15:46:08 -07:00
Juan Hoyos 52a4d7786d
Add analyzers, fix issues detected by them, style enforcement, and some misc bugs in SOSRunner (#3721)
Enforcement of style to be consistent with dotnet/runtime.
Enable more analyzers that are compliant with SDL requirements.
Misc bug fixes around sync contexts and async IO.
Use some utility methods available in .NET 6 when possible.
2023-03-10 17:00:25 -08:00
Adeel Mujahid b59b08d918
Rename COMPlus_ to DOTNET_ (#3712)
* Rename COMPlus_ to DOTNET_

* Add WithRuntimeConfiguration

* Add a comment

* Update documentation/FAQ.md
2023-03-06 14:23:10 -08:00
Mike McLaughlin a6e568cc64
Add service manager and reflection based service discovery (#3448)
* Add service manager and reflection based service discovery

Add GetTargetId to native ITarget

Load service and command assemblies from directory.

Add LoadExtensions

Add IRuntimeProvider interface that allows IRuntime implementations to be added to the IRuntimeService.

Support multiple service instances for IRuntimeProvider. Added IServiceProvider.GetServices() extension method to get them.

Added the ContextService.ContextServiceProvider to deal with the context service's special needs.

Added the ServiceImportAttribute support. There are Utilities helper functions that process this attribute.

Add IHost.OnTargetCreate event. Removed IHost.DestroyTarget and add ITarget.Destroy. Allows the context and other services
to managed state when targets come, go and flush. Makes target destruction more explicit by the implementations.

Use the ServiceImportAttribute in commands. Add "Optional" ServiceImportAttribute flag.

Add IServiceProviderManager interface to abstract the ServiceProvider functions.

Add as a service the PEModule wrapper around PEReader, ElfModule around ElfFile and MachOModule around MachOFile.

Pass IServiceProvider to constructors instead of using ITarget.Services. This removes the recursion from the ImageMappingMemoryService and MetdataMappingMemoryService.

Update extensibility doc

Add starting runtime id to runtime providers

Add native type/field interfaces/impls

Add WriteLine() to CommandBase and console service extensions.

Fix module Version property.

Fix testasset xml generation and repackaging scripts

Update symstore version

Update test assets version

* Add switch by id to `runtimes` command

* Catch load exceptions

* Change to loading extensions from the tool/host install directory

* Code review feedback

* Undo some of the code review feedback

* Code review feedback

Removed weird this parameter from IServiceContainer.DisposeServices(). Use RemoveServices() to prevent recursion.

Removed IServiceContainer.GetCachedService extension method and call IServiceContainer.TryGetCachedService directly.

* More Code review feedback

* More code review feedback

* More code review changes

* Add provider registration support to service manager

Instead of supporting multiple instances of the same service type, this change allows
services to get "provider" factories registered up the Provider scope.  This simplifies
the service container implementation.

Add EnumerateProviderFactories to IServiceManager.

* Allow ServiceImportAttribute on method and constructor parameters to control the Optional metadata flag.

* Code review feedback

* CR feedback: Better PEModule, ELFModule and MachOModule service implementation

The service container no longer exposes itself to services.

* CR feedback: cleanup service manager's global/context container support

* Refactor IServiceContainer to ServiceContainerFactory and ServiceContainer

Remove interface and put implementations in DebugServices.

* Code review feedback

* Code review
2023-02-10 18:19:30 -08:00
Mike McLaughlin a2aa40a3ed
Remove duplicate SOS command docs (#3612)
* Remove duplicate SOS command docs

Issue: https://github.com/dotnet/diagnostics/issues/3395

https://learn.microsoft.com/en-us/dotnet/core/diagnostics/sos-debugging-extension replaces the deleted ones.

Update some help text and lldb commands.

* Fix verb tenses

* More verb tense fixes in cmd help

* Code review feedback from docs PR
2023-01-26 09:57:09 -08:00
Lucas Trzesniewski 271f5b7655
Fix environment variable name (#3604) 2023-01-18 00:47:52 -08:00
Mario Hewardt f0bca056f2
Update tutorial scenario - App is experiencing intermittent exceptions (#3550) 2022-12-13 21:49:09 -05:00
Adeel Mujahid 8647f5fe4b
Moderenize triggerdump in docs (#3507) 2022-11-14 16:01:39 -08:00
Juan Hoyos d9f3aac958
Revert "Update Ubuntu 16.04 images (#3336)" (#3342)
This reverts commit b5bca688fe.
2022-09-02 04:46:52 -07:00
Adeel Mujahid b5bca688fe
Update Ubuntu 16.04 images (#3336)
* Update Ubuntu 16.04 images

* Simplify documentation

* Address CR feedback
2022-08-31 13:32:55 -07:00
Marius Ungureanu 232f17d4f2
Add gchandles and objsize commands to lldb debugger extension (#3192)
* GCHandles should work on all platforms, so remove the artificial constraint

* Enable objsize in lldb and SOS debugger

* Add gchandles command

* It builds!

```
000000011bf9fcd8     2190       332880 System.RuntimeType+RuntimeTypeCache
000000011badb120      131      1535936 System.Object[]
Total 34402 objects

Handles:
    Strong Handles:       3683
    Pinned Handles:       6
    Ref Count Handles:    10740
    Weak Long Handles:    5316
    Weak Short Handles:   9624
    Dependent Handles:    5033
```

* Fix code style
2022-07-18 19:01:23 -07:00
Mike McLaughlin e5ba58f495
Enable shipping dbgshim packages (#3088) 2022-05-23 16:18:15 -07:00
Martin-Molinero 6b2b94c7b6
Fix Typo (#3071) 2022-05-13 11:36:22 -07:00
mikelle-rogers 2d9d866853
Create EventPipeFormat.md (#3024) 2022-04-20 18:36:59 -06:00
Dan Moseley 570ef70aa1
Update lldb instuctions (#3020)
Mostly just delete distro versions that are not supported for any supported .NET version.
2022-04-18 15:04:14 -07:00
Juan Hoyos 4c0a75d8c1
Update privatebuildtesting.md (#2943) 2022-03-17 12:05:54 -07:00
mikelle-rogers b0352625a0
Adding dotnet-trace report (draft 2) (#2650)
* Responding to input to create second draft

Opening pull request in my GitHub account, first draft is located as closed pull request in dotnet/diagnostics repo.

* update command line style, add potential header

* updating to use subcommands

Co-authored-by: John Salem <josalem@microsoft.com>

* Update to include subcommands

* clarify dotnet-trace report descriptions

* update to create consistency

Created consistency within the documentation and examples.

* Creating clarity with consistency

Created consistency between dotnet=trace collect's and report's parameter names.

* Update documentation/design-docs/dotnet-tools.md

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>

Co-authored-by: John Salem <josalem@microsoft.com>
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
2021-12-14 18:22:33 -07:00
Tom McDonald 22c9d6b6f2
Update 2.1 to 3.1 netcoreapp in diagnostic repo documentation (#2706)
* Update 2.1 to 3.1 netcoreapp in diagnostic repo documentation
Completes #1640

* Update a few instances of 2.1 I missed in the first commit

* Remove .NET version specific info in README.md

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
2021-10-26 15:54:12 -07:00
Juan Hoyos 0d948e3d14
Update sos-debugging-extension.md (#2704) 2021-10-25 15:06:23 -07:00
Mike McLaughlin cdcb72dd5c
Fix misc SOS bugs (#2600)
Fix misc SOS bugs

* Fix bug in the AddFilesFromDirectoryToTpaList issue: https://github.com/dotnet/diagnostics/issues/2596

* Added some logging to GetLineByOffset

* Improve SymbolService.ParseSymbolPath support for Watson. Issue https://github.com/dotnet/diagnostics/issues/2512. Can
now handle the various symbol paths that Watson can throw at us. Doesn't support actually calling the symbol server
dll like in the symsrv*symaudit.dll*\\server\share syntax. The dll is ignored.

* Minor doc updates

* Better loadsymbols error message when no server is set
2021-09-20 16:32:51 -07:00
John Zabroski 7cb03dbd4b
minor formatting fixes (#2494) 2021-08-09 10:48:28 -07:00
Justin Anderson b1d8624ad0
Add GetProcessInfo2 command, response, tests, and docs. (#2360) 2021-06-30 22:37:58 -07:00
David Mason dfb97e8c45
Add new DiagnosticClient commands for IPC features (#2268)
Client commands for dotnet/runtime#52175 and dotnet/runtime#52567
2021-06-28 11:17:35 -07:00
yp19910928 560d6f8557
Update dotnet-tools.md (#2182) 2021-04-15 10:21:32 -07:00
John Salem 0679216c66
Change default trace name to app name + timestamp (#2092)
* Change default trace name to app name + timestamp

* Update in-repo docs

* PR feedback
* ordinalIgnoreCase compare
* only use filename instead of whole path
* update help text
2021-04-01 11:08:49 -07:00
Juan Hoyos 844567b827
Change references from master to main (#2075) 2021-03-12 00:02:00 -08:00
David Wrighton 1d0b2be78e
Add --show-child-io feature (#1968)
* Fix deadlock when redirecting large amounts of child process output, and add ability to not redirect child process behavior
- Use a small set of tasks to consume and ignore arbitrary data passed through standard output/error
- Add a new switch to dotnet-trace called --redirect-child-output which can be set to false to allow viewing data. (By default the option defaults to true, which may be confusing. I'd like some feedback on that.

* Adjust dotnet-trace to add --show-child-output and improve exit code handling

* Add testing

* Update doc in repo

* Fix issues identified in testing

* Move logic which waited for process to exit to avoid premature Dispose operations

* Code review feedback
2021-02-10 11:55:29 -08:00
Mike McLaughlin 843a8409dd
Misc interface and implementation changes (#1930)
Misc interface and implementation changes

Add IExportSymbols and IModuleSymbols interfaces and implementation

Change IModule.IndexFileSize/IndexTimeStamp to uint?.

Renamed IRuntimeService.Runtimes to EnumerateRuntimes to be more consistent with the rest of the interfaces.

Add IHost.EnumerateTargets().
2021-01-29 16:03:38 -08:00