On Jun 27, 2016, at 7:38 PM, 郑魁 <[email protected]> wrote: > Hi all, I was trying HeapProf on ARM target, But always get a Empty call > stack. > Step: > 1. cross-compile jemalloc-4.2.1 (./configure --build=x86_64-unknown-linux-gnu > --host=arm-none-linux-gnueabi EXTRA_CFLAGS="-fno-omit-frame-pointer > -DUSE_UTF8 -O2 -fPIC -std=gnu99 " LDFLAGS=" -fPIC -std=gnu99" > CC="arm-linux-gnueabi-gcc" CXX="arm-linux-gnueabihf-g++" > AR="arm-linux-gnueabihf-ar" CFLAGS="-O2" --enable-debug --enable-prof > ) and test.c (a very simple code) > 2. running "MALLOC_CONF=stats_print:true LD_PRELOAD=/usr/lib/libjemalloc.so > ./test" , Yes, it works! > 3. Try profile heap like following: > MALLOC_CONF=prof:true,lg_prof_sample:0,prof_final:true > LD_PRELOAD=/usr/lib/libjemalloc.so ./test > then get heap file "jeprof.10678.0.f.heap" with empty call stack: > /tmp/jemalloc # cat jeprof.10678.0.f.heap > cat jeprof.10678.0.f.heap > heap_v2/1 > t*: 1000: 54673752 [0: 0] > t0: 1000: 54673752 [0: 0] > @ > t*: 1000: 54673752 [0: 0] > t0: 1000: 54673752 [0: 0] > > Note: With same steps and commands, HeapProf works on x86 platform; like: > kuii@ubuntu:~/mem/jemalloc/mytest$ > MALLOC_CONF=prof:true,lg_prof_sample:0,prof_final:true > LD_PRELOAD=/home/kuii/mem/jemalloc/jemalloc-4.2.1/lib/libjemalloc.so ./test > kuii@ubuntu:~/mem/jemalloc/mytest$ cat jeprof.23836.0.f.heap > heap_v2/1 > t*: 10: 47112 [0: 0] > t0: 10: 47112 [0: 0] > @ 0x7fa08cb98c2d 0x7fa08cb91a1d 0x7fa08cb5d171 0x7fa08cb5d3da 0x7fa08cb5d651 > 0x40054c 0x400573 0x7fa08c7b0ec5 0x400469 > t*: 10: 47112 [0: 0] > t0: 10: 47112 [0: 0]
A few months ago I tracked down the cause of a similar report, and it turned out to be due to a bug in libgcc on ARM. Try libunwind (--enable-prof-libunwind). Jason _______________________________________________ jemalloc-discuss mailing list [email protected] http://www.canonware.com/mailman/listinfo/jemalloc-discuss
