c++ - Best way to make loop profiling -


i must change c/c++ program lot of loop inside 1 function. msut add cuda functions.

before start making changes, wanted take time loops found. did't find profiling programs make that. best way that's. on linux. if have solutions let me know.

here find example of tool makes want haven't find or : http://carbon.ucdenver.edu/~dconnors/papers/wbia06-loopprof.pdf

i use gperftools, , figure out code spending of it's time. once have identified function or part of function, you're done. understanding instructions "heaviest" in function require long running testcase particular loop, profiler can sufficient data each instruction (or @ least instructions) in loop. profiling down instructions not relevant if looking replace code technology - unlikely replacing 1 loop of few lines of code much, since there'd overhead. instead, want take larger block , move across cuda.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -