memory leak of C functions with pprof WriteHeapProfile

60 views
Skip to first unread message

Pavan

unread,
Apr 20, 2020, 4:30:24 PM4/20/20
to golang-nuts
Hi, I am debugging memory leak in a go application. It has lot of C functions called with in. 
I am trying to use pprof.WriteHeapProfilepprof to dump the memory allocations .

after generating dump file with WriteHeapProfile, it doesnt indicate memory allocations with-in C functions. 

ex: If i call C.greet function and do lot of mallocs inside C function, greet, it doesnt indicate the greet function. 

Please let me know if there are other profilers when C functions are involved with go programs. 


Regards,
Pavan

robert engels

unread,
Apr 20, 2020, 6:31:07 PM4/20/20
to Pavan, golang-nuts
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6af1d1ec-b8d2-4545-a737-21cf1471d7a3%40googlegroups.com.

Pavan

unread,
Apr 21, 2020, 8:39:43 AM4/21/20
to golang-nuts
Thanks for the link. even valgrind gives good info on go binary for C functions. 

Regards


On Tuesday, April 21, 2020 at 4:01:07 AM UTC+5:30, robert engels wrote:
On Apr 20, 2020, at 1:19 PM, Pavan <sudars...@gmail.com> wrote:

Hi, I am debugging memory leak in a go application. It has lot of C functions called with in. 
I am trying to use pprof.WriteHeapProfilepprof to dump the memory allocations .

after generating dump file with WriteHeapProfile, it doesnt indicate memory allocations with-in C functions. 

ex: If i call C.greet function and do lot of mallocs inside C function, greet, it doesnt indicate the greet function. 

Please let me know if there are other profilers when C functions are involved with go programs. 


Regards,
Pavan

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages