|
From: Nicholas N. <nj...@ca...> - 2004-03-25 08:43:23
|
On Wed, 24 Mar 2004, Josef Weidendorfer wrote:
> You are right. It's only a matter of writing a conversion script from massif
> data (raw/ASCII ?) to cachegrind/calltree format.
> KCachegrind should be able to cope with multiple cachegrind/calltree simple
> concatenated together (for multiple consensi). The format is described in a
> HTML documentation in the calltree package.
> Any volunteers?
I'm not sure about this. With (K)Cachegrind, you have a figure for every
instruction in the program, and these get mapped onto individual lines.
For Massif, you don't really have a spacetime figure for every
instruction. I think you'd only be annotating lines containing a function
call that allocates memory, or that (eventually) calls a function that
allocated memory? Eg, in this (nonsense) program:
int* f(void)
{
return malloc(1000); // 11 * 1000 * t
}
int* g(void)
{
bar();
for (i = 0; i < 10; i++)
f(); // 10 * 1000 * t
return f(); // 1 * 1000 * t
}
int* h(void)
{
foo();
x = y + z;
return g(); // 11 * 1000 * t
}
(where 't' is the length of time all the blocks are in existence for).
The comments show where the annotations would go; I'm assuming h() is
only called once.
Is that right?
N
|