I have a small doubt regarding profiling applications which never exit until we manually reboot the machine.
I used tools like valgrind which talks about memory leaks or bloating of any application which exits after sometime.
But is there any tool which can be used to tell about memory consumption, bloating, overhead created by the application at various stages if possible?
NOTE: I am more intrested to know about apps which dont exit ... If an app exits I can use tools like valgrind ..
Have you tried GNU Gprof?
Note that in this document, "cc" and "gcc" are interchangeable. ("cc" is assumed as an alias for "gcc.") http://www.cs.utah.edu/dept/old/texinfo/as/gprof_toc.html
Profiling is intrusive, so you don't want to deploy the app with the profiler attached, anyway. Therefore, include some
#ifdef PROFILE_MODE
-code that exits the app after an appropriate amount of time. Compile with -DPROFLILE_MODE, profile. Deploy without PROFILE_MODE.I have used rational purify API's to check incremental leaks. Haven't used the API's in linux. I found the VALGRIND_DO_LEAK_CHECK option in Valgrind User Manual, I think this would suffice your requirement.
Rational Purify can do that, at least on windows. There seem to be a linux version but I don't know if it can do the same.
I'd consider adding a graceful exit from the program.
Modify your program slightly so that you can request a Valgrind leak check at any point - when the command to do that is recieved, your program should use
VALGRIND_DO_LEAK_CHECK
frommemcheck.h
(this will have no effect if the program isn't running under Valgrind).