path: root/Documentation
diff options
authorJohn Salem <>2019-06-04 16:09:59 (GMT)
committerAndrew Au <>2019-06-04 16:09:59 (GMT)
commitb3ff5135ecba8d47cca9c02550d04e592b2e2310 (patch)
treed03dfe46096481855555fc71802445511e5b6acf /Documentation
parent8368b69bea1e70933f24a42cf626e90c1266cbfd (diff)
Update to AutoTrace (#24936)
* * Add license headers to autotrace.h|cpp * use W() macro for getting correct string literal type * formalize env vars to be COMPlus_* style * add documentation * modify cmake files to have the flag and set default value to 0 * Fix typo
Diffstat (limited to 'Documentation')
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/workflow/ b/Documentation/workflow/
new file mode 100644
index 0000000..33787fb
--- /dev/null
+++ b/Documentation/workflow/
@@ -0,0 +1,23 @@
+> see: `src/vm/autotrace.h|cpp` for the code
+AutoTrace is used to run automated testing of the Diagnostic Server based tracing and specifically
+EventPipe. The feature itself is enabled via the feature flag `-DFEATURE_AUTO_TRACE`.
+## Mechanism:
+AutoTrace injects a waitable event into the startup path of the runtime and waits on that event until
+some number of Diagnostics IPC (see: Diagnostics IPC in the dotnet/diagnostics repo) connections have occurred.
+The runtime then creates some number of processes using a supplied path that typically are Diagnostics IPC based tracers.
+Once all the tracers have connected to the server, the event will be signaled and execution will continue as normal.
+## Use:
+Two environment variables dictate behavior:
+- `COMPlus_AutoTrace_N_Tracers`: The number of tracers to create. Should be a number in `[0,64]` where `0` will bypass the wait for attach.
+- `COMPlus_AutoTrace_Command`: The path to the executable to be invoked. Typically this will be a `|cmd` script.
+> (NB: you should `cd` into the directory you intend to execute `COMPlus_AutoTrace_Command` from as the first line of the script.)
+Once turned on, AutoTrace will run the specified command `COMPlus_AutoTrace_N_Tracers` times.