viraptor
viraptor

Reputation: 34205

Performance measuring with prof

Is there a way to run linux's prof in a way equivalent to what a program with -gprof would do? I know wouldn't be exact, but only statistically correct.

I'm basically looking for a way to do a gprof-like analysis on a C/C++ program that includes debug symbols, but without recompiling it.

Upvotes: 0

Views: 1494

Answers (1)

Peter G.
Peter G.

Reputation: 15144

I'm very satisfied lately by CPU profiler of the Google performance tools. Programs basically run at undistorted normal speed under it. No recompilation is required, linking against a special libraries is recommended but using LD_PRELOAD is also possible in most cases.

Upvotes: 1

Related Questions