Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the time measurements presented near curly braces in Very Sleepy profiler represent?

I'm using Very Sleepy to profile some C++ code, and I notice that in the Source view, where it shows the red line-by-lime time-spent measurements, there are always measurement on the lines that only have the method's open or close curly brace, in some cases these were pretty high compared to the other lines of code in the function.

My initial assumption it's showing the time spent pushing the method parameters into the stack for the opening curly brace, and the time spent popping the stack for the closing curly brace. Is this true?

like image 949
Omer Raviv Avatar asked Sep 13 '11 10:09

Omer Raviv


1 Answers

I got an answer to this from Richard Mitton (@grumpydev), the maintainer of Very Sleepy, on twitter: "Most likely the function has been optimized, so the line number isn't matched up exactly to the code any more. i.e. all the time gets lumped at the start, instead of being spread out over the course of the function."

like image 151
Omer Raviv Avatar answered Oct 26 '22 23:10

Omer Raviv