Comments (6)
Btw, do you have any tips how to resolve these [unknown] ([unknown])
references?
from flamegraph.
Yes, maybe we should change stackcollapse-perf.pl as you suggest.
As for seeing [unknown] references: you've got to fix the profiler, whatever it is. In this case, Linux perf_events. Just as one example as a guideline:
On Java, I run the java process with -XX:+PreserveFramePointer (which costs a small amount of overhead), so that at least perf can walk stacks sensibly. At that point you still get [unknown], but at least the address aren't total garbage (which they can be if the app steps on the frame pointer). Then I run a java agent, perf-map-agent, (immediately after the profile), which dumps a /tmp/perf-PID.map file for perf to do symbol translations.
How this works for other apps is up to the app, but may be similar. You need a way for stack traces to work (eg, frame pointer-based, or DWARF-based), and, a way for perf to do symbol translations (some thing that writes the /tmp/perf-PID.map file).
from flamegraph.
Thanks!
from flamegraph.
Hi,I've used '--perf-basic-prof' option when I profile nodejs,and I also get a file named '/tmp/perf-PID.map' under /tmp directory, but when I generate flame graph using 'perf script | ./stackcollapse-perf.pl | ./flamegraph.pl > MAIN.svg', it remains many 'unknown' label in my graph, how could that be?
perf script command returns like this:
from flamegraph.
As I understood it, it could be just garbage values on the stack. Garbage in a sense that there is not valid frame pointers (probably optimized stack logic, for example, code compiled with -fomit-frame pointer
).
from flamegraph.
I'm going to close this ticket because it's not a problem with Flame Graphs, which visualize the profiler output. If the profiler is emitting "[unknown]", then fix the profiler. It's system software, so ask your OS vendor.
I'd check if perf was complaining about file permissions, and fix that. Another issue has been buffering in v8, which was fixed recently -- look it up in v8 bug tracking, I don't have the URL on hand. I don't know when that fix will arrive in node, if it isn't there already. There are other issues that can cause "[unknown]" too, especially in JIT runtimes.
from flamegraph.
Related Issues (20)
- 本地安装了perl为什么提示不是有效的32位应用? HOT 1
- number of input lines to skip is error when I use dtrace on Mac HOT 1
- Supporting Times in Scientific Notation HOT 1
- dotnet-trace Chromium|NetTrace|Speedscope
- Show CPU cores involved in each function
- Errors when using perf and Intel Processor Trace HOT 1
- Consider stripping null byte in frame name
- stackcollapse-perf.pl should be more memory-efficient HOT 3
- FlameGraph output is always only two lines
- Flame graph enhancement (feature request)
- How to use with kernel v2.6.32?
- How to generate mixed hot/cold flame graph HOT 1
- flamegraph.pl search() function erroneusly counts hidden frames
- Flamegraph handles multi-thread program abnormality HOT 1
- Failure on `Hello, world!` with `ERROR No stack counts found` HOT 2
- Error while using stack collapse for pmc on freebsd
- bjdump: /tmp/perf-$pid.map: File format not recognized ▒
- Capturing stacks on Amazon Linux 2 kernel 4.14 and 5.10 HOT 1
- Segment Fault and report errors when I using perf script -F ...,trace HOT 3
- Trace file recreated and new file has a 'n' added to the end of the name after running
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.