Q
Q
q2zoff2019-01-09 07:09:36
linux
q2zoff, 2019-01-09 07:09:36

How can I find out the number of changes in the processor cores on which the application is running?

In other words, how do you know how many times a process has migrated from one processor core to another?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2019-01-09
@q27off

how to find out how many times a process has migrated from one processor core to another?

Running it under perf stat:
$ perf stat true

 Performance counter stats for 'true':

          0.801845      task-clock (msec)         #    0.445 CPUs utilized          
                 0      context-switches          #    0.000 K/sec                  
------>          0      cpu-migrations            #    0.000 K/sec                  
                42      page-faults               #    0.052 M/sec                  
           634,587      cycles                    #    0.791 GHz                    
           459,763      instructions              #    0.72  insn per cycle         
            89,841      branches                  #  112.043 M/sec                  
             3,812      branch-misses             #    4.24% of all branches        

       0.001801905 seconds time elapsed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question