Ask / Submit

app-development: heap profiling? [answered]

asked 2015-10-01 16:18:35 +0300

cptG gravatar image

As the title suggests: I'd like to profile the heap usage of my app - where and when how much memory was allocated. I built RPMs for libunwind and gperftools but tcmalloc's profile output only shows mapped libraries and not - as expected - detailed information about allocations. And yes, I installed the debuginfo-rpm of package, which was a debug build of course. Does anyone have experience or suggestions?

If anyone wonders why: The app basically consists of a SilicaListView that displays 70x70 icons (Image element) for each item and after a few items (dozens, not hundreds) memory usage goes from ~120MB (empty list) to ~300MB and pmap shows a bunch of [anon] blocks of 30MB to 70MB in size and I'd like to figure out where they come from...



edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by cptG
close date 2015-10-01 16:35:33.270733

1 Answer

Sort by » oldest newest most voted

answered 2015-10-01 16:35:10 +0300

cptG gravatar image

Hah! Turns out valgrind (with the tool massif) works just fine on the Jolla :) To anyone who reads this at some point: running your app with

valgrind --tool=massif <your-program>

Produces an output file that can be visualized with the great "massif-visualizer" tool (easily googleable), showing you the memory-hungry parts of your program.

edit flag offensive delete publish link more

Question tools



Asked: 2015-10-01 16:18:35 +0300

Seen: 109 times

Last updated: Oct 01 '15