dotnet/runtime

Expose setting CPU SamplingProfiler rate

Open

#82.939 aberto em 3 de mar. de 2023

Ver no GitHub
 (6 comments) (13 reactions) (0 assignees)C# (5.445 forks)batch import
area-Tracing-coreclrenhancementhelp wanted

Métricas do repositório

Stars
 (17.886 stars)
Métricas de merge de PR
 (Mesclagem média 12d 11h) (661 fundiu PRs em 30d)

Description

Background and Motivation

Microsoft-DotNETCore-SampleProfiler currently samples at a fixed rate of 1 ms, defined in ep-sample-profiler.c. In various situations, it would be beneficial to decrease the rate at which the samples are produced, thus lowering the profiling impact on the runtime.

Proposed Feature

Allow configuring the sampling rate in nanoseconds (_sampling_rate_in_ns) as part of the session creation process, preferably before the sampling starts.

Usage Examples

E.g. profiling in production, minimising the performance impact on the runtime.

Previously, this change was also mentioned in these (differently scoped) issues:

Guia do colaborador