dotnet/runtime

Expose setting CPU SamplingProfiler rate

开放

#82,939 创建于 2023年3月3日

 (6 条评论) (13 个反应) (0 位负责人)C# (5,445 个派生)batch import
area-Tracing-coreclrenhancementhelp wanted

仓库指标

星标
 (17,886 个星标)
PR 合并指标
 (平均合并 12天 11小时) (30 天内合并 661 个 PR)

描述

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:

贡献者指南