|
From: Juan C. M. S. <jua...@uc...> - 2009-09-11 18:28:54
|
Hello, I am new using Valgrind, so I wonder if I can use Valgrind to count the total number cycles needed to execute a custom program. I saw examples for cache memory, but I did not see any for global performance. Thanks in advance, Juan Carlos PS. BTW, is it the correct site to solve any doubt about using Valgrind? -- Juan Carlos |
|
From: Josef W. <Jos...@gm...> - 2009-09-14 12:08:48
|
Hi, On Friday 11 September 2009, Juan Carlos Martinez Santos wrote: > I am new using Valgrind, so I wonder if I can use Valgrind to count the > total number cycles needed to execute a custom program. I saw examples for > cache memory, but I did not see any for global performance. You can calculate a very rough estimation of cycles used from the event counts of the cache simulator. Such a formula is provided by KCachegrind, a GUI visualization tool of cachegrind/callgrind profile data. The formula used there can be adjusted to match your machine. For a better estimation, it would be good to integrate branch prediction events (available with cachegrind, not integrated into callgrind up to now) and other more fine granular counters of the kind of instructions executed (floating point instructions, locks, ...). > Thanks in advance, > > Juan Carlos > > PS. BTW, is it the correct site to solve any doubt about using Valgrind? Seems to be. Josef |