Memory profiling on SH4

Jason Evans jasone at canonware.com
Wed Dec 12 09:13:39 PST 2012


On Dec 6, 2012, at 5:07 AM, Konstantin Tokarev <annulen at yandex.ru> wrote:
> I'm trying to use jemalloc's memory profiler on SH4.
> 
> I've tried to use all available ways of unwinding: gcc, libgcc, and libunwind (recently ported to SH4). However, I always get meaningless dumps like
> 
> 
> heap profile: 6: 49296 [0: 0] @ heap_v2/524288
> 6: 49296 [0: 0] @
> 
> MAPPED_LIBRARIES:
> ....
> 
> 
> Any idea what am I missing here? I used both LD_PRELOAD and compile-time linking of libjemalloc.so.1, my application is built with debug information and -rdynamic, I use MALLOC_CONF=prof:true to enable profiling.
> 
> If no idea, how can I debug where the issue lies?

The problem looks to be related to backtracing.  There are three mechanisms currently supported: libunwind, libgcc, and gcc intrinsics.  Sadly, no single solution works everywhere, so I'd recommend trying libunwind to see if it does any better than libgcc.  See INSTALL for configuration details.

Jason


More information about the jemalloc-discuss mailing list