Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Valgrind - callgrind Profiler : How to know which function is taking more time

I am trying to profile for certain executable using valgrind - callgrind tool. I have created annotated output using callgrind_annotate --auto=yes. The created output tells me about the Ir count , which as per my understanding is the number of times that particular instruction was called, but I want to know which section of the code is taking maximum time in execution.

How can I know about it ?

In my application I want to find the the portion which is taking more time ... there may be cases certain function is called more number of time than other .. but the function which is called less number of time is taking more time than the other

like image 779
Ajay Avatar asked Oct 30 '15 11:10

Ajay


1 Answers

I would recommend you to use the UI KCachegrind. It makes much easier to understand your application flow and to detect possible bottlenecks.

like image 197
javier-sanz Avatar answered Sep 24 '22 00:09

javier-sanz