I'm looking for a tool which can help me to generate a memory accesses graph. I'm trying to optimize a search algorithm (written in c) and it would be very useful to know how the memory accesses are performed in order to optimize the memory accesses pattern.
I heard that cachegrind from valgrind could help me, but I think is not exactly what I'm looking for as I think it doesn't generate a trace of memory accesses and I already know the other information that can show me using the PAPI library.
The graph I want to generate has in the x axis the memory access order and in the y axis the memory address space (absolute or relative memory directions)