DOTNET_EnableEventPipe=1 vs dotnet-trace collect #68314
-
I'm wondering what the difference between enabling EventPipe tracing via environment variable namespace HelloWorld
{
class Program
{
static void foo()
{
System.Console.WriteLine("Hello World");
}
static void Main(string[] args)
{
foo();
}
}
} and a minimal c# project file: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project> Running In contrast, running I first assumed that the difference is due to different configured providers. According to this if
However, those are also enabled via
All providers which are enabled via
Though, this leads to a segfault on Ubuntu 20.04 (EDIT: the segfault is fixed for me by PR #68552). I'm probably missing something. Can someone shed some light on the difference between
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @directhex @steveisok @crummel - do you know who could help with this question? |
Beta Was this translation helpful? Give feedback.
-
I did some further experiments and it turns out that I ran into the following described in https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace#use-diagnostic-port-to-collect-a-trace-from-app-startup
Thus, I might have traced a different process than my Hello World application which might explain the file size difference. Running |
Beta Was this translation helpful? Give feedback.
I did some further experiments and it turns out that I ran into the following described in https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace#use-diagnostic-port-to-collect-a-trace-from-app-startup
Thus, I might have traced a different process than my Hello World application which might explain the file size difference. Running
d…