[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] gprof



Eero Tamminen wrote:
PS.  I just tested gprof quickly on Linux and on short run going through
the program mainloop and exiting on user input, it didn't produce any data.
I had to use the program a bit more to get any data.

Yes, it was something like this.
I'm not used to gprof, so I didn't understood everything at first.

Here are my new conclusions:

1) Compiling programs with profiling informations currently works fine. Be sure you have libc_g.a on your system, compile your program with -pg, run it, then you get a gmon.out file full of statistics.

2) Both the native and cross gprof work fine to analyze a gmon.out file. No differences.

3) There is a bug since gprof 2.20: the number of calls is not extracted at all from the gmon.out file (while this information is present). As a result a lot of functions are misssing, as well as the call tree, the result is a lot less useful.
Using an old gprof 2.19.1 on the same gmon.out works perfectly.
So:
- either some bug has been introduced in binutils 2.20 (probable)
- either the old gmon.out format used by the MiNTLib is now deprecated (maybe)

Anyway, I have seen what I was looking for: despite of bugs, the profiling machinery is still working.

--
Vincent Rivière