Measuring device drivers CPU/IO utilization caused by my program

Posted by Lior Kogan on Stack Overflow See other posts from Stack Overflow or by Lior Kogan
Published on 2011-01-06T19:16:25Z Indexed on 2011/01/06 21:54 UTC
Read the original article Hit count: 288

Sometimes code can utilize device drivers up to the point where the system is unresponsive.

Lately I've optimized a WIN32/VC++ code which made the system almost unresponsive. The CPU usage, however, was very low. The reason was 1000's of creations and destruction of GDI objects (pens, brushes, etc.). Once I refactored the code to create all objects only once - the system became responsive again.

This leads me to the question: Is there a way to measure CPU/IO usage of device drivers (GPU/disk/etc) for a given program / function / line of code?

© Stack Overflow or respective owner

Related posts about c++

Related posts about Windows