I'm using binutils-2.29.1-r1 on Gentoo Linux. When I'm trying to analyse C and C++ programs, gmon.out is generated successfully, but gprof fails to profile it. gprof only prints an empty profile containing only introduction to indexes like 'time', 'cumulative seconds', 'self seconds' ...... etc. I've tried to use gprof on different programs, some are C and some are C++, but gprof worked on none of them. Here's the output of uname -a: Linux PSE-Gentoo 4.12.12-gentoo #1 SMP Sun Dec 3 14:27:46 CST 2017 x86_64 Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz GenuineIntel GNU/Linux
Created attachment 10665 [details] E is the executable file compiled with g++ -pg -o E E.cpp, gprof.out is the output of gprof, E.in and E.out are valid input and output of E and are used to generate gmon.out.
The two Attachments are the same. It's caused by internet problems.
*** Bug 22548 has been marked as a duplicate of this bug. ***
Seems this is duplicate of Bug 22284 and Bug 21189, so should be closed as "fixed".
. *** This bug has been marked as a duplicate of bug 22284 ***