-
Notifications
You must be signed in to change notification settings - Fork 2k
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[unknown] functions #92
Comments
Btw, do you have any tips how to resolve these |
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). |
Thanks! |
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? |
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 |
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. |
Frequently I see in
perf sript
entries like this:Then flame graph is occupied with a lot of
[unknown]
functions, even though some of unknowns have binary associated with them. Could you modifystackcollapse-perf.pl
if it sees[unknown]
but there's binary to show binary name, it could be like[/path/bin]
for example. Or add option to do such replacements.The text was updated successfully, but these errors were encountered: