On Tue, 2014-01-14 at 08:57 -0800, Samuel Quiring wrote: > | Maybe you can do it with a shell-script wrapper? Eg: > | > | run-me.sh: > > | #! /bin/sh > > | LD_PRELOAD=./libfakec.so ./myapp -e > | > | Then run: > | > | valgrind --trace-children=yes ./run-me.sh > > > > This has been my approach. Now I am suspicious that - As explained in another mail, it is highly suspected that this will not help to solve your problem.
> -trace-children=yes is not working like I hoped. I get the EXACT > SAME output whether I have - -trace–children=yes or do not have that > option. So I think there must be more to getting - > -trace-children=yes to behave like I want. > > > Here is the output. Every number is the same whether or not I have "- > -trace-children=yes". > > > ==13527== HEAP SUMMARY: > ==13527== in use at exit: 19,116 bytes in 584 blocks > ==13527== total heap usage: 766 allocs, 182 frees, 29,553 bytes > allocated > ==13527== > ==13527== LEAK SUMMARY: > ==13527== definitely lost: 0 bytes in 0 blocks > ==13527== indirectly lost: 0 bytes in 0 blocks > ==13527== possibly lost: 0 bytes in 0 blocks > ==13527== still reachable: 19,116 bytes in 584 blocks > ==13527== suppressed: 0 bytes in 0 blocks The above must be the output of valgrind for the shell. The shell behaviour does not change for --trace-children=yes/no. But when giving --trace-children=yes, you should get additional input before. E.g. this is what I get: ==3589== Command: ./run.sh ... ==3590== Command: /home/philippe/valgrind/trunk_untouched/memcheck/tests/trivialleak ... ==3590== HEAP SUMMARY: ==3590== in use at exit: 1,000 bytes in 1,000 blocks ==3590== total heap usage: 1,000 allocs, 0 frees, 1,000 bytes allocated ... ==3589== HEAP SUMMARY: ==3589== in use at exit: 19,960 bytes in 572 blocks ==3589== total heap usage: 725 allocs, 153 frees, 26,630 bytes allocated ... So, with trace children, you see lines for different pids (and a heap summary result for each process which exits) Philippe ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users