rnunes
rnunes

Reputation: 2845

C performance measure

I'm looking for a measure performance tool for C (I'm using MinGW windows toolchain) that gives me some results like:

Thanks

Upvotes: 2

Views: 608

Answers (3)

Fermin
Fermin

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

liberforce
liberforce

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

Chris Morgan
Chris Morgan

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

Related Questions