# Code Profiling tools

**URL:** <https://forum.legato.io/t/code-profiling-tools/6510>\
**Category:** Uncategorized\
**Created:** [May 22, 2023, 8:14pm UTC](https://forum.legato.io/t/code-profiling-tools/6510 "2023-05-22T20:14:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [May 23, 2023, 12:33am UTC](https://forum.legato.io/t/code-profiling-tools/6510/2 "2023-05-23T00:33:54Z")

</div>

You can see here

> [@How to use Valgrind on WP76 to investigate memory leaks](https://forum.legato.io/t/how-to-use-valgrind-on-wp76-to-investigate-memory-leaks/5217/2):
>
> You can try the procedure below on WP76 R13.3: download the yocto source code open ./meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc and add the following line: IMAGE\_INSTALL\_append = " valgrind" make the yocto image there will be error to make the yocto.cwe as it is too big. Instead we need to transfer the binary to module’s RAM area on module, type the following: mkdir /tmp/valgrind on PC: scp ./build\_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/valgrind/3.13.…

> [@Valgrind's memory management: out of memory](https://forum.legato.io/t/valgrinds-memory-management-out-of-memory/5881/2):
>
> I don’t see problem with WP76 R13 with attached binary: [valgrind.rar](https://forum.legato.io/uploads/short-url/twtnwIEWpziYsoczHMPnV6OO5CU.rar) (3.3 MB) mkdir /tmp/valgrind mkdir /tmp/tmp\_lib;mkdir /tmp/tmp\_lib\_wr; cp -rf /lib /tmp/tmp\_lib mount -t overlay overlay /lib -o lowerdir=/lib,upperdir=/tmp/tmp\_lib,workdir=/tmp/tmp\_lib\_wr; Use WINSCP to transfer all the binary to /tmp/valgrind Use WINSCP to transfer ld-linux.so.3 to /lib ( cannot copy directly from /tmp/valgrind to /lib) chmod -R 777 /tmp/valgrind export VALGRIND\_LIB=/tmp/valgrind root@swi-mdm9x28-…

---

_[View the full topic](https://forum.legato.io/t/code-profiling-tools/6510)._
