I'm trying to determine the peak (heap) memory usage of a Perl script using Valgrind:
valgrind --tool=massif --depth=1 /usr/bin/perl script.pl arguments
Valgrind seems to start up just fine, the script executes, but no massif.out.PID
file is generated. I've successfully used the same kind of command with C and Lua programs but for some reason it doesn't seem to work with this Perl script.
I'm on Mac OS 10.6.6, my Perl is the system standard v5.10.0 built for darwin-thread-multi-2level
and my Valgrind is 3.6开发者_Go百科.1 (from MacPorts).
You are missing the trace-children option. This one works fine for me
valgrind --tool=massif --depth=1 --trace-children=yes perl script.pl
精彩评论