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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -