Microsoft.Diagnostics.Runtime
2.0.0-beta.19618.7
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.Diagnostics.Runtime --version 2.0.0-beta.19618.7
NuGet\Install-Package Microsoft.Diagnostics.Runtime -Version 2.0.0-beta.19618.7
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="2.0.0-beta.19618.7" />
paket add Microsoft.Diagnostics.Runtime --version 2.0.0-beta.19618.7
#r "nuget: Microsoft.Diagnostics.Runtime, 2.0.0-beta.19618.7"
// Install Microsoft.Diagnostics.Runtime as a Cake Addin #addin nuget:?package=Microsoft.Diagnostics.Runtime&version=2.0.0-beta.19618.7&prerelease // Install Microsoft.Diagnostics.Runtime as a Cake Tool #tool nuget:?package=Microsoft.Diagnostics.Runtime&version=2.0.0-beta.19618.7&prerelease
ClrMD 2.0 Beta Release Notes
Over the last few weeks we have been rewriting a lot of the internal core of ClrMD to fix a lot of issues that have been problematic in the library. ClrMD 2.0 is faster, uses less memory, and is thread safe (with exceptions), but it has a lot of breaking changes which will require you to update existing code to use it.
Quick Notes
We plan to continue fixing bugs in ClrMD 1.1 for the forseeable future, so you are not forced to upgrade if you do not want to. I do plan to only add new features to ClrMD 2.0, but the community is welcome to submit Pull Requests to backport or add features to ClrMD 1.1.
Please note that the API surface area of ClrMD 2.0 is not finalized and there may be breaking changes between now and when the library is out of beta. I expect to release the non-beta version around March/April 2020.
Changes from ClrMD 1.1
Added features:
- Memory Usage/Performance - ClrMD has reduced its overall memory usage and improved performance.
- Cache Control - You can now control what ClrMD caches to via
DataTarget.CacheOptions
. Note that disabling caches does greatly slow the library down but it also drastically reduces memory usage. You can also callClrRuntime.FlushCachedData
at any time to empty ClrMD's caches and reclaim memory. - Thread Safety - If
ClrRuntime.IsThreadSafe
returns true then you are allowed to call all functions from multiple threads. Please note that you likely will not see much performance improvements by running algorithms in parallel. The CLR debugging layer, mscordaccore.dll, takes a giant lock around most operations which means we do not get easy performance gains. This should make your code much easier to write if you need to do work on another thread. - Nullable Reference Types - ClrMD fully implements nullable reference types so you will know exactly what you need to null check from the library.
- Architectural Overhaul - ClrMD is now much less internally coupled. Most implementation types are now public, allowing you to use those types directly or to use the I*Builder interfaces to "mock" objects more easily. While the changes aren't perfect for mocking the library, it's definitely better than were we were before.
- Clean up Exceptions Thrown by ClrMD - This is planned but not yet completed.
- Provide a set of Benchmarks - ClrMD will provide a reasonable set of benchmarks so you know how much an operation should cost. This is planned but not yet completed.
Removed:
- Removed Blocking Objects - This was buggy in its initial implementation and never worked right. We do not intend to support this or rebuild it in 2.0.
- SymbolLocator partially removed - ClrMD still supports communicating with a symbol server to locate binaries but it's no longer intended to be a general purpose symbol server client.
- CLR v2 and v4 (prior to 4.5) support removed - ClrMD supports all .Net Core versions and Desktop .Net 4.5 and beyond. If you need to debug earlier versions of CLR, please use ClrMD 1.1.
- PDB Reading Removed - The implementation I was carrying in ClrMD was buggy and did not support PortablePDBs. I do not intend to keep this functionality in ClrMD 2.0. It's just too difficult to keep working and it's not needed or used by the rest of the library.
Why did we make these changes?
The first version of ClrMD is nearly 10 years old now, and it's starting to show its age. Over the years I've made some bad design decisions and added some questionable features that I wish I could fix or move to another (supported) library, but I've tried to maintain compatibility for folks who already built tools on top of ClrMD and that's hamstrung development in a lot of areas.
Please feel free to file issues against this beta version of ClrMD if you have questions, a feature request, or a bug to report.
Better performance, less memory.
We use Span<T> in place of most byte[] data reading operations, and use ArrayPool instead of doing our own allocating. We have eliminated a ton of needless garbage generated at runtime.
Better architecture
The old ClrMD implementation had a deep, confusing, and poorly thought out internal class heirarchy. This mostly grew organically from years of development and not be cleaned up due to compatibility concerns. The entire library has been refactored from the ground up to fix this. We've also removed Lazy<T> usage throughout a lot of the codebase because it made debugging problems with ClrMD difficult to do. We still evaluate most properties lazily, just without the use of that class.
Thanks
Thank you to everyone who contributed feedback, issues, and code for ClrMD 2.0. Especially NextTurn, who submitted countless changes and pull requests to make this possible.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Framework | net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
-
.NETCoreApp 2.1
- System.Buffers (>= 4.5.0)
- System.Collections.Immutable (>= 1.7.0)
- System.Memory (>= 4.5.3)
- System.Runtime.CompilerServices.Unsafe (>= 4.6.0)
-
.NETFramework 4.7.1
- System.Buffers (>= 4.5.0)
- System.Collections.Immutable (>= 1.7.0)
- System.Memory (>= 4.5.3)
- System.Runtime.CompilerServices.Unsafe (>= 4.6.0)
NuGet packages (37)
Showing the top 5 NuGet packages that depend on Microsoft.Diagnostics.Runtime:
Package | Downloads |
---|---|
BenchmarkDotNet
Powerful .NET library for benchmarking |
|
ppy.osu.Framework
A 2D application/game framework written with rhythm games in mind. |
|
Backtrace
Backtrace's integration with C# applications allows customers to capture and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors. |
|
Phoesion.Glow.SDK.Firefly.SrvHost.DotNet.Dependencies
Phoesion Glow SDK Firefly SrvHost Runner (DotNet) Dependencies |
|
DynaMD
Helper objects to browse complex structures returned by ClrMD |
GitHub repositories (39)
Showing the top 5 popular GitHub repositories that depend on Microsoft.Diagnostics.Runtime:
Repository | Stars |
---|---|
dnSpy/dnSpy
.NET debugger and assembly editor
|
|
winsw/winsw
A wrapper executable that can run any executable as a Windows service, in a permissive license.
|
|
dotnet/BenchmarkDotNet
Powerful .NET library for benchmarking
|
|
xoofx/markdig
A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
|
|
microsoft/perfview
PerfView is a CPU and memory performance-analysis tool
|
Version | Downloads | Last updated |
---|---|---|
4.0.0-beta.24360.3 | 1,837 | 7/11/2024 |
4.0.0-beta.24360.2 | 95 | 7/10/2024 |
4.0.0-beta.24320.3 | 318 | 6/20/2024 |
4.0.0-beta.24314.3 | 917 | 6/14/2024 |
3.1.512801 | 193,630 | 2/29/2024 |
3.1.506101 | 40,887 | 2/1/2024 |
3.1.456101 | 85,456 | 11/13/2023 |
3.1.456003 | 23,579 | 11/11/2023 |
3.1.455904 | 7,064 | 11/10/2023 |
3.0.442202 | 75,759 | 8/22/2023 |
3.0.0-beta.23214.4 | 1,384 | 4/17/2023 |
3.0.0-beta.23177.1 | 280 | 3/28/2023 |
3.0.0-beta.23165.1 | 267 | 3/16/2023 |
3.0.0-beta.23159.4 | 209 | 3/9/2023 |
3.0.0-beta.23158.2 | 207 | 3/9/2023 |
3.0.0-beta.23156.1 | 190 | 3/6/2023 |
2.4.416101 | 1,354,472 | 3/12/2023 |
2.3.405304 | 114,379 | 1/5/2023 |
2.2.343001 | 97,419 | 10/31/2022 |
2.2.332302 | 13,599,274 | 6/23/2022 |
2.2.332001 | 4,331 | 6/20/2022 |
2.1.327703 | 14,536 | 5/27/2022 |
2.0.226801 | 3,083,230 | 5/19/2021 |
2.0.226401 | 1,066 | 5/14/2021 |
2.0.222201 | 58,341 | 4/22/2021 |
2.0.221201 | 11,129 | 4/14/2021 |
2.0.217201 | 53,858 | 3/22/2021 |
2.0.161401 | 1,092,154 | 12/14/2020 |
2.0.156101 | 34,738 | 11/18/2020 |
2.0.151903 | 28,479 | 10/19/2020 |
2.0.145301 | 97,706 | 9/4/2020 |
2.0.142701 | 6,444 | 8/28/2020 |
2.0.142501 | 1,676 | 8/25/2020 |
2.0.142103 | 1,727 | 8/21/2020 |
2.0.141902 | 5,780 | 8/19/2020 |
2.0.137201 | 25,908 | 7/22/2020 |
2.0.130507 | 59,461 | 6/6/2020 |
2.0.0-rc.20303.6 | 467 | 6/4/2020 |
2.0.0-rc.20278.6 | 550 | 5/28/2020 |
2.0.0-beta.20276.4 | 390 | 5/27/2020 |
2.0.0-beta.20273.1 | 456 | 5/23/2020 |
2.0.0-beta.20272.2 | 465 | 5/22/2020 |
2.0.0-beta.20272.1 | 391 | 5/22/2020 |
2.0.0-beta.20268.2 | 470 | 5/18/2020 |
2.0.0-beta.20230.2 | 531 | 4/30/2020 |
2.0.0-beta.20230.1 | 390 | 4/30/2020 |
2.0.0-beta.20229.3 | 389 | 4/30/2020 |
2.0.0-beta.20223.2 | 396 | 4/23/2020 |
2.0.0-beta.20222.8 | 357 | 4/23/2020 |
2.0.0-beta.20222.7 | 350 | 4/23/2020 |
2.0.0-beta.20222.5 | 360 | 4/22/2020 |
2.0.0-beta.20220.3 | 364 | 4/20/2020 |
2.0.0-beta.20213.1 | 498 | 4/13/2020 |
2.0.0-beta.20174.2 | 492 | 3/24/2020 |
2.0.0-beta.20072.5 | 769 | 1/23/2020 |
2.0.0-beta.19618.7 | 530 | 12/19/2019 |
2.0.0-beta.19612.8 | 435 | 12/12/2019 |
1.1.142101 | 259,905 | 8/21/2020 |
1.1.132302 | 13,216 | 6/23/2020 |
1.1.127808 | 93,770 | 5/29/2020 |
1.1.126102 | 8,012,572 | 5/17/2020 |
1.1.122004 | 57,734 | 4/20/2020 |
1.1.116301 | 47,320 | 3/13/2020 |
1.1.61812 | 87,805 | 12/19/2019 |
1.1.57604 | 4,926,830 | 11/26/2019 |
1.1.57004 | 5,492 | 11/20/2019 |
1.1.46104 | 121,056 | 9/11/2019 |
1.1.37504 | 92,337 | 7/25/2019 |
1.1.35902 | 8,033 | 7/9/2019 |
1.1.35504 | 1,949 | 7/5/2019 |
1.0.5 | 1,966,066 | 3/19/2019 |
1.0.3 | 222,359 | 2/13/2019 |
1.0.2 | 24,794 | 12/17/2018 |
1.0.0 | 16,197 | 11/22/2018 |
0.9.180305.1 | 269,411 | 3/6/2018 |
0.9.170809.3 | 236,555 | 8/9/2017 |
0.9.170626.1 | 22,697 | 6/26/2017 |
0.8.31-beta | 722,882 | 10/15/2015 |
0.8.30-beta | 6,598 | 9/16/2015 |
0.8.27-beta | 40,934 | 9/30/2014 |
0.8.26-beta | 1,969 | 8/14/2014 |
0.8.25-beta | 3,404 | 3/12/2014 |
0.8.24-aamain00309 | 1,462 | 12/2/2014 |
0.7.1-beta | 3,540 | 5/3/2013 |