Question

I've hesitated to ask such a question because I fear that it's too located.

I wanted to ask on Meta if it is too located, but I hesitated ... and well ... I do need an answer. So I will delete if there is any problem.

I'm working on Very Sleepy, which is a code profiler that helps me detect hotspots and locks problems on a application.

What I just want to know is why are some ligns green and some black in Very Sleepy analysis ? This is a link to an exemple image of analysis : http://www.codersnotes.com/images/3.png

My guess is that the green ones are system calls and black ones are only "Process" calls.

Was it helpful?

Solution

Very Sleepy is open source, so you get the source code but little to no documentation. There isn't that much of it, most of the 5+ megabyte download is not actually code.

Taking a peek at the src/wxProfilerGUI/CallstackView.cpp source code file, it looks like it is painting in green when the symbol's isCollapseFunction or isCollapseModule member is true. Searching for those symbols takes you to database.cpp in the same directory:

    sym->isCollapseFunction = osFunctions.Contains(sym->procname.c_str());
    sym->isCollapseModule = osModules.Contains(sym->module.c_str());

So it is green when the symbol is an operating system function or module. Which looks accurate, the symbols that are green in your screenshot are indeed Windows DLL functions. The hint to take from that then is that there's no point in trying to optimize that function, you can't change it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top