Is it possible to run valgrind on a piece of code?

I have a memory leak that occurs in a well-known section of a fairly large system. I would like to run full speed to this part of the code, run memgrick valgrind in this section and collect the memcheck valgrind report at the end of the section, without completing the run further. Is it possible?

+4
source share
1 answer

Not with memcheck, no. According to the frequent valgrind request , callgrind is currently the only valgrind component that supports this:

5.4. Is it possible to bind Valgrind to an already running program?

. , Valgrind , , , . - . Valgrind .

- , - ( 5 , ), , . , Callgrind - , ​​. . callgrind_control.

+6

Source: https://habr.com/ru/post/1570348/


All Articles