언어 설정

Menu
Sites
Language
mtrace with Native App

Hello,

I have tried to use mtrace in Native App to check memory usage but it looks not storing mtrace output file.

I confirmed simple test C code just having main() function with mtrace()/muntrace() call, built with i386-linux-gnueabi-gcc included in Tizen SDK 2.1, runs as expected on Tizen Emulator and leaves mtrace output file. I tried same thing with Tizen Native App generated in Tizen IDE, and embed mtrace() / muntrace() call into OspMain(). It can be built without any error / warning, and also runs on Emulator without any error but it doesn't leave mtrace output file even if MALLOC_TRACE is set.

Please let me know if anyone has an experience of using mtrace on Tizen Native App.

To check memory usage, Valgrind is another option but I have met some problem that my applcation crashes with Valgrind so I'm trying mtrace in parallel.

Thank you,

Keisuke

 

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

2 댓글
wil smith
How do you set the MALLOC_TRACE emulator/target.
Keisuke Tsuji
Hi, I have tried to set MALLOC_TRACE on shell then start the application. For example, type as follows in shell $ MALLOC_TRACE=./trace.log ./testcode.exe Another way is, in C source, to call 'setenv("MALLOC_TRACE", "/tmp/trace.log",1);' before calling mtrace() function. This looks also working. With these ways simple C test code creates trace file, but both didn't work with Tizen Native app so trace file was not created even if app run. Thank you, Keisuke Tsuji