Datadog

.NET Continuous Profiler: Exception and lock contention | Datadog

Apr 4, 2024Christophe Nasarre
.NET Continuous Profiler: Exception and lock contention | Datadog
SummaryAI, from the source post

This post details the implementation of exception and lock contention profiling within Datadog's .NET continuous profiler. For exceptions, it describes fetching details like type, message, and location using `ICorProfilerCallback::ExceptionThrown` and `ICorProfilerInfo::GetClassFromObject`. For lock contention, it explains how CLR events like `ContentionStart` and `ContentionStop` are captured, and how duration is computed, including recent contributions to the .NET runtime for richer `ContentionStart` event data. It also outlines strategies for older .NET versions using EventPipe and ETW.

More from the Java CPU Profiling trail