views:

379

answers:

2

I searched for this after seeing it's the top rated item when profiling using Very Sleepy, and it seems everyone gets the answer "it's a system function, ignore it". But Sleepy's hint for the function says:

Hint: KiFastSystemCallRet often means the thread was waiting for something else to finish. Possible causes might be disk I/O, waiting for an event, or maybe just calling Sleep().

Now, my app is absolutely thrashing the CPU and so it's a bit weird 33% of the time is spent waiting for something to happen.

Do I really just ignore it?

EDIT: apparently, 77% of the calls to this come from QueryOglResource (?) which is in module nvd3dnum. I think that might be nvidia Direct3D stuff, i.e rendering.

+1  A: 

That function is pretty meaningless for a profiler, it's basically the logical end point for a whole range of system functions. What functions do you have calling it? WaitForMultipleObjects? Asynch reads?

Daniel Goldberg
+1  A: 

Don't ignore it. Find out how it's being called. If you look back up the call stack to where it gets into your code, that will tell you where the problem is. It's important to halt it at random (not with a breakpoint), so that the stack traces that are actually costing a lot of time will be most likely to appear.

Mike Dunlavey