Does anyone know of any tool that would measure the time spent in a C++ program? I need the measurement-granularity of upto each line, and not each function. Meaning, its easy to know the time spent on a function, by taking a diff. of stop_time and start_time. But its not practical to take that diff for each line or a loop. Does anyone know of any method or tool?