Hi,

I'm trying to use Valgrind to obtain information on the memory footprint of
functions within an application. I am using Callgrind which can give me the
number of memory accesses (read or write) in a function. I want to do two
additional things as a first step:

a) Track the memory reads within a function that were written to by some
other calling function. Track the writes within a function that are not
later referenced by this function. (Getting the flow of data between
functions)
b) Collapse multiple reads without an intervening write into one count.

Any hints as to a good starting point? I have a timeline of less than two
weeks. I am not a software developer, but I have coded linked lists before.

I was looking into modifying callgrind to do the job and it seems really
complicated. Is a BB the same as an SB? It looks like your BBs are allowed
to have more than one branch/jump instruction. I looked at the instrument
function which takes an SB as input and from my understanding:

i) structures are created to hold the cost, number of jumps and
instructions.
ii) All the flattened instructions are traversed and events are added to an
event list.
iii) Flushevents on all branches, including the last one.
iv) The flush event call populates the cost in the BB structures and also
sends the costs to a cache simulator.

There is a way to query the current context I think, so I believe I will
have to track every memory address that is seen in the function and make a
list which holds addresses which are read without having first been written
to, and vice versa. Should I just create my own separate data structures for
this? If so, how do I send the results back along with Ir, Dr and Dw in the
same fashion?

Thanks,
Siddharth
------------------------------------------------------------------------------
FREE DOWNLOAD - uberSVN with Social Coding for Subversion.
Subversion made easy with a complete admin console. Easy 
to use, easy to manage, easy to install, easy to extend. 
Get a Free download of the new open ALM Subversion platform now.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to