LD_PRELOAD=./libfake.so ./my_process --> runs fine and prints memory stats
But,
LD_PRELOAD=./libfake.so valgrind ./my_process --> doesnt print the memory stats
From few online blogs, i understand that valgrind does forward any signals to
the child process that it is running on but it doesnt seem to work here.
There is no parent-child relationship between valgrind and ./my_process.
Both valgrind and ./my_process run in the same address space as just one
process.
The inter-process communication would be extremely expensive if valgrind
and ./my_process did not share the same address space, and memcheck tracking
of each memory access would be difficult if there were 2 threads of control.
The command-line parameter "--trace-signals=yes" causes valgrind to report on
signals.
The Linux utility /usr/bin/strace also reports on signals. (Probably use
something like "strace -e trace=file" to reduce the syscalls that strace
reports;
in particular 'read' and 'write' are usually heavily used and ignorable.)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users