Reputation: 2845
I'm looking for a measure performance tool for C (I'm using MinGW windows toolchain) that gives me some results like:
Occupied memory by a variable;
Cycles to run the program/a function;
Spent time on a function.
Thanks
Upvotes: 2
Views: 608
Reputation: 1
Usually when gprof does not give you results it is because it is a multithread application. gprof does not support this kind of apps.
Upvotes: 0
Reputation: 11454
You can use gprof with is shipped with GCC. Here are some examples.
You'll find more about that in the GCC documentation. Just remember that you must use the -pg
option for both compilation and link.
However, I got that working, but only on small software. On the bigger one I work on, I only got empty timing, and couldn't find the cause of that. But maybe you won't have the same problem...
Upvotes: 0
Reputation: 2080
Google Perftools is multi-platform: http://code.google.com/p/google-perftools/
GCC has profiling as well: How to use profile guided optimizations in g++?
Upvotes: 2