How do I compile on linux to share with all distributions?
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.
1:getnameinfo specifies socklen_tPorting Windows platform C++ to POSIX (Linux) C++ - WSAGetLastError()Invoke web page from Linux C
2:Is there a (Linux) C++ IDE that can 'construct' a project from a makefile?Using many mutex locksQuery size of block device file in Python
If you must receive by with simple metrics, in the past, I have implemented a simple profiler. Track memory and time. Track the start and stop of each function, print a line at the start and stop. Track the memory before and after if important. Have all of this gated by a runtime variable this you must change externally. In a web application, it could be an extra post/receive parameter. In a thick client program, it could be an extra switch.. Then, at runtime, you could start to collect data. I have added multiple levels in the past as well to allow for selective and then more detailed data collection.. Good luck..
You must try valgrind. It is a bundle of different modules put toreceive her into a neat package.