c++ - Calculating accurate cpu usage per task in assembly -


i've multi-task program written in c++ , want calculate cpu usage each of threads in sub second basis (may 100 ms) may know /proc/stat or didn't have accuracy resolution of time.

i want know there way calculate clock cycles consumed each thread in assembly or c/c++?

starting linux 2.6.12 , glibc 2.4, can use clock_gettime clock of type clock_thread_cputime_id realiable timing information


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -