Comments (11)
I tracked the problem down to an issue with the installed perf version. After downgrading from perf-6.4.4-200.fc38 to perf-6.2.6-300.fc38, Rust symbols are demangled properly again. Sorry for the noise here.
from flamegraph.
@kangalio Building perf from source has worked for me. While I'm not sure how correct this is, these are the notes I found from when I built it:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
git checkout v6.6
make -C tools/perf -s
PERF=./path_to_self_built_perf cargo flamegraph ...
from flamegraph.
What platform are you using flamegraph on? How is the code that you're profiling generated?
from flamegraph.
I'm using Fedora 38 (uname -r
prints 6.4.11-200.fc38.x86_64
) on x86_64.
How is the code that you're profiling generated?
I'm not entirely sure what you mean by this. I'm using criterion (version 0.5.1) with code I wrote and successfully generated flamegraphs with properly displayed function names for before.
I tried multiple old projects to see if there was any difference but they all show the unwanted characters.
The behavior also appears when using flamegraph on an example in my project (cargo flamegraph --example my_example --root --freq 50000
):
I used perf
on the example executable with sudo perf record -p 123 -F 500000
which resulted in the following output of perf report
. The example was compiled with debug = true
in profile.release
.
from flamegraph.
No problem, glad you figured it out!
from flamegraph.
I'm having the problem on Fedora as well. It appears the latest versions of perf do not demangle the names correctly?
from flamegraph.
Would be great if someone can look for/file a bug against Fedora and reference it here.
from flamegraph.
I did file an issue in the RedHat bugtracker as this is where the "File a new bug report" link on the fedora package site leads to.
from flamegraph.
@arctic-alpaca awesome, thanks!
from flamegraph.
On Fedora 39, the oldest available perf package is 6.5.4 (and the newest is 6.6.3), which still have the bug :( Will update if I find a workaround
from flamegraph.
To install required dependencies to build perf
with most optional features enabled:
dnf install elfutils-devel libdwarf libdwarf-devel libcap-devel elfutils-libelf-devel numactl-libs libunwind-devel lzma-sdk-devel libaio-devel libtraceevent-devel libfm-devel slang-devel systemtap-sdt-devel perl-devel binutils-devel libbabeltrace-devel
then you can run dnf mark remove {package_names}...
in order to label them as "autoinstalled" if you want them to be removed later.
from flamegraph.
Related Issues (20)
- The call stack of functions mostly records addresses HOT 2
- Is there `--offline` mode? HOT 1
- Name mangling in output HOT 2
- Per thread graph HOT 3
- Per thread graph HOT 1
- Run on WSL has only 1 sample in the flamegraph HOT 4
- Flamegraph throws error when attempting to profile Rust application HOT 6
- Very long analysis due to slow addr2line calls HOT 2
- Running with `--root` cannot read kallsyms HOT 1
- command to generate flamegraph from existing perf.data HOT 10
- On MacOS, dtrace fails due to running as the wrong CPU architecture if the "cargo" binary's arch doesn't the arch of the program being profiled HOT 1
- Frequency option is hardly documented HOT 1
- Better error message if `perf` isn't installed HOT 2
- Incorrect warning given when running flamegraph for a unit test HOT 2
- Support for probing HOT 1
- Can you place performance marks/waypoints in code that are visible in the output? HOT 1
- Feature: Split Flamegraphs per Unit Test/Bench HOT 1
- Could you add `--config` as option for cargo flamegraph? HOT 3
- Run on build script HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flamegraph.