dotnet/runtime

Expose setting CPU SamplingProfiler rate

Open

#82,939 建立於 2023年3月3日

在 GitHub 查看
 (6 留言) (13 反應) (0 負責人)C# (5,445 fork)batch import
area-Tracing-coreclrenhancementhelp wanted

倉庫指標

Star
 (17,886 star)
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:

貢獻者指南