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

Unable to profile in WSL1 #8822

Open
LoganDark opened this issue May 10, 2022 · 6 comments
Open

Unable to profile in WSL1 #8822

LoganDark opened this issue May 10, 2022 · 6 comments
Labels
subsystem::profiler Issues related to profiler support subsystem::wsl WSL issues

Comments

@LoganDark
Copy link

LoganDark commented May 10, 2022

Environment

  • IntelliJ Rust plugin version: 0.4.171.4611-221-nightly
  • Rust toolchain version: 1.62.0-nightly (ea92b0838 2022-05-07) x86_64-unknown-linux-gnu
  • IDE name and version: CLion 2022.1 (CL-221.5080.224)
  • Operating system: Windows 10 2004 build 19041.928 (x64)
  • Macro expansion engine: new
  • Name resolution engine: new
  • Additional experimental features: org.rust.cargo.emulate.terminal

Problem description

IntelliJ-Rust seems to only support using Perf on WSL2 for profiling, which runs in a virtual machine (i.e. lazy, bad performance, bad integration). WSL 1 runs much closer to the bare metal and is tied much more closely to the OS, but IntelliJ-Rust doesn't seem to support it yet.

It seems like this is a known limitation because IntelliJ-Rust contains this error message:

Perf profiler is not available for selected WSL distribution
Try updating WSL to the newer one

It would help me get more accurate profiles if I were able to profile in WSL 1 without the overhead of Hyper-V. Windows builds above 18342 support dtrace, maybe that supports WSL processes?

Steps to reproduce

Try to profile in WSL1.

@mili-l
Copy link
Member

mili-l commented May 10, 2022

Hi @LoganDark,
Profiler is supported only for WSL2
#7857

@LoganDark
Copy link
Author

Hi @LoganDark, Profiler is supported only for WSL2 #7857

That's why I opened this issue

@AlyoshaVasilieva
Copy link

IIRC WSL1 doesn't support kernel performance counters, so profiling on it is impossible

@LoganDark
Copy link
Author

IIRC WSL1 doesn't support kernel performance counters, so profiling on it is impossible

Are kernel performance counters required to profile code? I thought you just took a bunch of samples of the stack/whatever and then built a flame graph out of that. Isn't that what perf is doing?

@mili-l
Copy link
Member

mili-l commented May 16, 2022

@LoganDark
It is limitation from WSL side, Perf is not supported on WSL1.
microsoft/WSL#329

@LoganDark
Copy link
Author

@LoganDark It is limitation from WSL side, Perf is not supported on WSL1. microsoft/WSL#329

At this time we are focusing on providing the Bash on Ubuntu environment and some of the developer tools (i.e. node). Tools like perf have taken a lower priority. For future releases we'll be using our User Voice page to help inform us on the priorities of the community.

Doesn't seem like a definitive answer to me, just corporate garbage.

@Undin Undin added subsystem::profiler Issues related to profiler support subsystem::wsl WSL issues labels May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem::profiler Issues related to profiler support subsystem::wsl WSL issues
Projects
None yet
Development

No branches or pull requests

4 participants