Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perfcollect & PerfView: unable to get events working #1718

Open
adamsitnik opened this issue Sep 29, 2022 · 2 comments
Open

perfcollect & PerfView: unable to get events working #1718

adamsitnik opened this issue Sep 29, 2022 · 2 comments

Comments

@adamsitnik
Copy link
Member

adamsitnik commented Sep 29, 2022

While working on dotnet/BenchmarkDotNet#2117 I've very carefully followed the docs and have failed to get a trace file that contains events that could be successfully presented by PerfView. I've tried both x64 and arm64 Ubuntu machines.

The app that I've used:

string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
string content = new string('a', 100_000);

for (int i = 0; i < 10_000; i++)
	File.WriteAllText(path, content);

File.Delete(path);

Console.WriteLine("Done!");
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <LangVersion>Latest</LangVersion>
  </PropertyGroup>
</Project>

The trace files I got:

net5.trace.zip
net6.trace.zip
net7rc1.trace.zip

@brianrob could you please take a look at these trace files and let me know if I am doing something wrong? I was expecting that with the default settings (COMPlus_PerfMapEnabled=1, COMPlus_EnableEventLog=1) some default events are going to be enabled and captured.

@brianrob
Copy link
Member

@adamsitnik, sorry for the delay on this. It looks like something probably went wrong enabling the events in the runtime. Is it possible that COMPlus_EnableEventLog=1 wasn't set for the application itself (as opposed to the collection shell)? The logs show that LTTng is properly installed and was being configured properly, but the traces don't contain any events.

@adamsitnik
Copy link
Member Author

Hello @brianrob !

No worries, for some reason I did not get a notification about your response and here I am, with 2 months delay.

sorry for the delay on this

All the env vars are set:

https://github.com/dotnet/BenchmarkDotNet/blob/12bf220e11fddc8e65b066eb1f300b63bfde7e9b/src/BenchmarkDotNet/Extensions/ProcessExtensions.cs#L133-L142

You can give it a try by cloning BDN and running our sample:

git clone https://github.com/dotnet/BenchmarkDotNet.git
cd BenchmarkDotNet/samples/BenchmarkDotNet.Samples
sudo dotnet run -c Release -f net7.0 --filter '*PerfCollectProfiler*' --job dry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants