# OK, so we're gonna do the normal thing...
if ($Cachegrind eq 'yes') {
- $CachegrindPrefix = "valgrind --skin=cachegrind --logfile-fd=99 99>$CachegrindStats";
+ $CachegrindPrefix = "valgrind --tool=cachegrind --log-fd=9 9>$CachegrindStats";
} else {
$CachegrindPrefix = '';
}
local($tot_live) = 0; # for calculating residency stuff
local($tot_samples) = 0;
+ $GCWork = 0;
while (<STATS>) {
if (! /Gen:\s+0/ && /^\s*\d+\s+\d+\s+(\d+)\s+\d+\.\d+/ ) {
$max_live = $1 if $max_live < $1;
}
$BytesAlloc = $1 if /^\s*([0-9,]+) bytes allocated in the heap/;
- $GCWork = $1 if /^\s*([0-9,]+) bytes copied during GC/;
+ $GCWork += $1 if /^\s*([0-9,]+) bytes copied during GC/;
# if ( /^\s*([0-9,]+) bytes maximum residency .* (\d+) sample/ ) {
# $MaxResidency = $1; $ResidencySamples = $2;