Gerard Garcia
Gerard Garcia

Reputation: 115

Tool to generate memory accesses graph

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)

Upvotes: 3

Views: 427

Answers (2)

Marco
Marco

Reputation: 607

Some tools in this project do what you want: http://www.inf.usi.ch/faculty/hauswirth/research/TraceVisualization.html I don't know if you can download them anywhere or ask them to share a copy, I used them because I was a student of this professor!

Upvotes: 0

sirlark
sirlark

Reputation: 2207

If you're using gcc or the gnu std C library, the malloc and free hooks might help. https://www.gnu.org/software/libc/manual/html_node/Hooks-for-Malloc.html#Hooks-for-Malloc

Upvotes: 0

Related Questions