I have a slow-running process that uses some poorly-documented libraries.
I suspect the libraries are killing performance by continuously copying lots memory (in RAM). This hypothesis is support by the fact that perf record/report
tells me that memcpy
is using 15% of my time.
But I'd like to catch this red-handed, as it were. I believe I could detect this condition if I could get a sense of the amount of memory per time unit that the program is trying to allocate.
Is there are a tool such as gdb
or prof
which I can use to attach to a running process and get a sense of its malloc/free statistics?