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

1

8

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

Emmalynn answered 30/10, 2015 at 11:7 Comment(1)
Possible duplicate of use valgrind to know time(in seconds) spent in each functionReidreidar
M
5

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

Maggie answered 30/10, 2015 at 11:22 Comment(4)
I have not yet installed the KCachegrind ... but wont its output will be again on basis of event count.Emmalynn
kcachegrind can show the time-usage of function calls?Northern
Where is it / how can I show it?Reformatory
It's been a while I have not used KCachegrind. It used to be included on valgrind. Their github repo is active though github.com/KDE/kcachegrindMaggie

© 2022 - 2024 — McMap. All rights reserved.