Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Lorensson <lateralusx.github@gmail.com>2021-05-12 12:21:01 +0300
committerGitHub <noreply@github.com>2021-05-12 12:21:01 +0300
commitb4f4418d56d32c3a1677b5651899a112d7e02226 (patch)
treeb6c7bbec40a277052d053f39a381b49ff294276c /src/coreclr/inc
parent2e618ff905a619bc75138e26e2ef15ebd5bc19b6 (diff)
Add streaming support for EventPipe env trace file. (#52443)
* Add streaming support for EventPipe env trace file. Using EventPipeOutputPath and EventPipeConfig it is possible to setup an EventPipe file session running during complete runtime execution. There was however no logic that would flush this session, so if number of events included in file exceeded max buffer all subsequent events would be lost. Depeding on use case (like startup profiling) that could be acceptable, unless rundown events where needed, since they would likely be lost unless buffer size was way biffer than default limit (1MB). Adding ability to run a streaming thread (similar to IPC) together with file sessions would greatly increase usage of the default file session and could then be real useful in cases where regular diagnostic tooling won't work or increase the complexity of the profilig task. In order to preserve old behavior, a new EventPipeSessionType has been introduced, EP_SESSION_TYPE_FILESTREAM and that will work similar to existing EP_SESSION_TYPE_FILE, but also start a streaming thread, making sure buffer content is periodically flushed into file, reduce risk of getting a flooded buffer manager triggering lost events. For the default trace file, old behavior is kept and there is a new env variable, COMPlus_EventPipeOutputStreaming that can be used to enable using EP_SESSION_TYPE_FILESTREAM instead of EP_SESSION_TYPE_FILE for the default file session.
Diffstat (limited to 'src/coreclr/inc')
-rw-r--r--src/coreclr/inc/clrconfigvalues.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/coreclr/inc/clrconfigvalues.h b/src/coreclr/inc/clrconfigvalues.h
index fec282fbe10..62a7665b9e1 100644
--- a/src/coreclr/inc/clrconfigvalues.h
+++ b/src/coreclr/inc/clrconfigvalues.h
@@ -708,6 +708,7 @@ RETAIL_CONFIG_STRING_INFO(INTERNAL_EventPipeConfig, W("EventPipeConfig"), "Confi
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeRundown, W("EventPipeRundown"), 1, "Enable/disable eventpipe rundown.")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeCircularMB, W("EventPipeCircularMB"), 1024, "The EventPipe circular buffer size in megabytes.")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeProcNumbers, W("EventPipeProcNumbers"), 0, "Enable/disable capturing processor numbers in EventPipe event headers")
+RETAIL_CONFIG_DWORD_INFO(INTERNAL_EventPipeOutputStreaming, W("EventPipeOutputStreaming"), 0, "Enable/disable streaming for trace file set in COMPlus_EventPipeOutputPath. Non-zero values enable streaming.")
//
// Generational Aware Analysis