Please keep discussions on-list.
David Gregorczyk <[email protected]> writes:
> but what can I do to summarize massif's multiple outputs for
> each child process? I've tried to watch out memory usage for
> Xerces-C++ and get more than 10 output files. To get complete memory
> consumption, I have to intrepret every file with ms_print and search
> for the peak consumption. For one measurement that seems ok, but I
> have to check out the program's behaviour for 16 input files.
Sounds like a job for your friendly neighborhood awk.
BEGIN {
max_percent=0
max_bytes=0
}
/heap allocation functions/ {
percent=$1
bytes=$2
if(percent > max_percent || bytes > max_bytes) {
max_percent=percent
max_bytes=bytes
max_file=FILENAME
}
}
END {
printf "Largest heap usage was %d (%d%%) from output %s\n", \
max_bytes, max_percent, max_file
}
Untested, I've actually never even used massif, just basing that on the
doc's output. You get the idea though.
Massif might have an xml output mode too (I don't know). I would
expect programmatically parsing the default output will break in some
subsequent version, but presumably an xml output would be designed for
consistency across revisions.
Cheers,
-tom
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users