Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux library for profiling

Is there a Linux library that can run performance profiling within a running process?

I have a rather large linux program that is heavily script-based. Depending on the scripts, the program can have wildly different behaviors (and performance problems). What would be nice is a low-overhead performance library that I can embed in the same process that monitors and provides real-time feedback to the process about it's own performance.

Oprofile would be fantastic, if I could start it within the program and keep it isolated to only that program. From the documentation I've read, it doesn't appear possible.

Does anyone know of any such library?

Thanks!
Andrew Klofas

like image 688
Andrew Klofas Avatar asked Aug 25 '26 05:08

Andrew Klofas


1 Answers

Check out gprof - it should do what you want.

like image 161
sholsapp Avatar answered Aug 27 '26 20:08

sholsapp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!