linuxpowerpcoprofile

Can I specify one CPU core while using oProfile?


I need to do a performance counter analysis on a 8-core server using oProfile, can oProfile only record events on core 7? Thank you!


Solution

  • The operf man page does not describe such an option (which would seem like the --cpu option of the perf record command).

    With operf you can try the --separate-cpu / -c option (This option categorizes samples by cpu) with the --system-wide option (This option is for performing a system-wide profile.), and then provide a cpu:cpulist profile specification for opreport (Only consider profiles for the given numbered CPU).

    For example:

    $ sudo operf --separate-cpu --system-wide
      ... <Ctrl-C or kill -SIGINT>
    
    $ opreport cpu:0