c++ profiler that can attach to a running process?

c++, linux, performance, profiling

Solution

Free

- oprofile

- perf

- SystemTap (probably want a RedHat/CentOS distro for this)

Not Free

- VTune

Problem

I have a program written in c++ that I want to profile, and I want to avoid restarting it when I start and stop profiling. Ideally I would be profiling both CPU usage and memory allocation. Is there any tool that will allow me to do this? I'm running on Linux.

Original source