On Wednesday 20 April 2011, Вадим Воеводин wrote:
> Can anyone tell me, is it possible to collect number of fetches and 
> cache misses for a particular array using Callgrind/Cachegrind?

Unfortunately not possible at the moment.
The ideal thing would be to add a command line option for "please
separate counters for different variable accesses" ;-)

An easy way to implement it would be to add a client request to
restrict event counter increments to accesses falling into a given
memory range; then you would do the following before your code
fragment:

        CALLGRIND_RESTRICT_COLLECTIONRANGE( &(b[0]), &(b[BSIZE]) );

Hmm. Would that be useful?

Josef

> For example, I have such fragment:
> 
>                  for (j = 0; j < length; j++) {
>                          for (i = ip[j]; i <= ip[j+1]-1; i++) {
>                                  b[ia[i]] = b[ia[i]] + a[i]*x[j];
>                          }
>                  }
> 
> And I want to collect information only about array /b/. How can this be 
> done?
> 
> Thanks in advance!
> 
> 


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to