Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

monitor cpu usage per thread on windows mobile device

Is is possible to measure CPU per thread on a windows mobile (or CE 5) device programmatically (c++)? If not, is their a utility that will monitor the CPU usage of a process?

like image 805
Matt H Avatar asked May 22 '26 10:05

Matt H


2 Answers

CPU usage cannot be directly measured because, unlike an x86, the ARM processor doesn't have a register for it. You can calculate it using the Toolhelp APIs to get a list of processes and their child threads and then use GetThreadTimes to figure out how much time each thread is using.

Keep in mind that doing this calculation directly affects how much the CPU is in use.

like image 160
ctacke Avatar answered May 23 '26 23:05

ctacke


Someone wrote a tool that looks a lot like Task Manager on the PC: http://www.vttoth.com/LPK/taskmanager.html

As ctacke says, it does seem to use a lot of the CPU. It reports uses ~15%-30% of our CPU on our 800MHz ARM device.

like image 29
Aaron Avatar answered May 23 '26 22:05

Aaron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!