I need to analyze the memory accesses of several programs. What I'm looking for is a profiler that allows me to see which of my programs is more intensively related to the intensity of my computer. I am very interested in the number of accesses to the data cache L1, L2 and main memory.
This should be for Linux, and if it is only possible using the command. The programming language is C ++. If there is any problem with my question, for example, I don’t understand what you mean, or we need more data, please comment below.
Thanks.
Update using solution
I chose Crashworks answer as favored because it is the only one that provided something from what I was looking for. But the question remains open, if you know the best solution, answer.
If you use Intel hardware, then VTune for Linux is probably the best and most full-featured tool available to you.
MSRs , perfctr. Linux, , ( x86 - PPC, , ): http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/11169/35961/01704008.pdf?temp=x http://www.cise.ufl.edu/~sb3/files/pmc.pdf
, , , , . , "l1 cache miss" , , , , , . , , , .
VTune . AMD CodeAnalyst. Valgrind , , .
, . ( ), , .
, ( , ). top.
(, / ). strace.
, , gdb. , , , , (, , ). , GDB , , DDD, gtk, .
. , , - , ( ). , L1 . , , KDB o KDBG, .
2. , Linux , L1. Linux , Linux. L1.
, cachegrind ( valgrind) .
Need more than the unix team topwill provide? This provides processor and memory usage in linux programs in an easily readable presentation format.
top
If you need something more specific, perhaps a profiler, a software language (java / C ++ / etc.) Will help determine which profiler is best for your situation.