Datadog

.NET Continuous Profiler: CPU and wall time profiling | Datadog

Feb 13, 2024Christophe Nasarre
.NET Continuous Profiler: CPU and wall time profiling | Datadog
SummaryAI, from the source post

This post details the implementation of CPU and wall time profiling in the Datadog .NET continuous profiler. It explains how application threads are monitored and sampled, including handling of managed and native threads. The implementation of CPU profiling involves sampling runnable threads and measuring their CPU consumption using OS-specific APIs (NtQueryInformationThread on Windows, /proc/self/task/<tid>/stat on Linux). The post also highlights an internal example where the CPU profiler was used to reduce CPU consumption by identifying a memory-intensive code path in the profiler itself.

More from the Java CPU Profiling trail