We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
7
6
By default perf record uses the frame pointer register. Modern compilers don't record the frame address and instead use the register as a general purpose. The alternative is to compile with -fno-omit-frame-pointer flag or use a different alternative: record with --call-graph "dwarf" or --call-graph "lbr" depending on your scenario.
For gprof I found that gprof main.out > main.gprof gives the error gmon.out: "not in executable format", and the program was required as an input for the call, i.e. gprof ./myprog main.out > main.gprof
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
complete the sentence: my question is about...
use tags that describe things or concepts that are essential, not incidental to your question
-fno-omit-frame-pointer
flag or use a different alternative: record with--call-graph "dwarf"
or--call-graph "lbr"
depending on your scenario.[unknown]
frames might be caused by stack too deep if DWARF method is used --- although I haven't investigated very carefully. gist.github.com/user202729/b6ea134715ddf851efd0047b3197fc33 has some resources.gprof
I found thatgprof main.out > main.gprof
gives the errorgmon.out: "not in executable format"
, and the program was required as an input for the call, i.e.gprof ./myprog main.out > main.gprof