General
cancel
Showing results for 
Search instead for 
Did you mean: 

gdb, to profile heap usage of an app

Raghava_1
Occasional Advisor

gdb, to profile heap usage of an app

Hi,

There is a process, a stub basically, which further loads up a zillion shared libs while in execution.

To profile the heap usage(growth/decline) of this process over a period of time and upon certain critical points, gdb seems to be a better option.

Need pointers, to how one could have gdb attached to this process in execution, made to dump heap reports periodically (to a file), also, dump heap reports on reaching specific breakpoints (a list of critical functions, simply); all while the process still being alive.

Even a simple script that invokes gdb, attaches it to a pid, dumps a heap profile report and then detaches gdb, letting the process run as it was; would help. Please provide pointers to gdb options / possibilities in this regard.

Will attaching gdb to this process have any kind of impact on the exe in execution?

Please provide pointers/details for the above query.

Thanks && regards!
_raghava_
1 REPLY
ajay.paragi
Occasional Visitor

Re: gdb, to profile heap usage of an app

You could use gdb for application heap/leak
profiling.

Please visit www.hp.com/go/wdb

please go through the white paper
http://h21007.www2.hp.com/portal/download/files/unprot/devresource/Tools/wdb/doc/memdebug-updated_081109.pdf

please go through the section "Supported Modes of Memory-debugging in WDB"
and "Debugging in Attach Mode" in the white paper.