You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wget https://github.com/microsoft/WSL2-Linux-Kernel/archive/refs/tags/linux-msft-wsl-<VER>.tar.gz
tar -xf linux-msft-wsl-<VER>.tar.gz
Install the compilation dependencies.
"To actually make sense of the perf record, and get the interactive menu, also install these on top of flex and bison to let perf demangle binaries": @tbarbetteSource, + commands from @MondayCha.
cd WSL2-Linux-Kernel-linux-msft-wsl-<VER>cd tools/perf
make JOBS=1
sudo cp perf /usr/local/bin
Enable perf for unprivileged users.
"Lower the perf_event_paranoid value in proc to an appropriate level for your environment. The most permissive value is -1 but may not be acceptable for your security needs etc..." Source
perf record target/x86_64-unknown-linux-musl/flamegraph/rebar run --dataset-dir dataset/sars-cov-2/2023-11-30 -- populations "*" --output-dir output/flamegraph
flamegraph -o flamegraph_sars-cov-2.svg --perfdata perf.data
Troubleshooting
Using on a pre-compiled binary doesn't yield informative names on the function names.
"It seems like you might be stripping away the debug symbols? Do you maybe have strip = true somewhere in Cargo.toml or maybe in some other build script?"@xzaramurdSource
flamegraph hangs after perf record due to an issue collapsing stacks. Might be solved with:
Refer to: c80a888, 967674e
Perf
Check WSL2 kernel version in powershell.
wsl --version
Download the source code for the matching kernel release: https://github.com/microsoft/WSL2-Linux-Kernel/releases
Install the compilation dependencies.
Compile and install
perf
.Enable
perf
for unprivileged users.Flamegraph
Intall
flamegraph
.Build for flamegraph.
Profile.
perf record target/x86_64-unknown-linux-musl/flamegraph/rebar run --dataset-dir dataset/sars-cov-2/2023-11-30 -- populations "*" --output-dir output/flamegraph flamegraph -o flamegraph_sars-cov-2.svg --perfdata perf.data
Troubleshooting
Using on a pre-compiled binary doesn't yield informative names on the function names.
flamegraph
hangs after perf record due to an issue collapsing stacks. Might be solved with:The text was updated successfully, but these errors were encountered: