简体   繁体   English

使用oProfile时可以指定一个CPU内核吗?

[英]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? 我需要使用oProfile在8核服务器上执行性能计数器分析,oProfile可以仅在Core 7上记录事件吗? Thank you! 谢谢!

The operf man page does not describe such an option (which would seem like the --cpu option of the perf record command). operf手册页没有描述这样的选项(看起来像perf record命令的--cpu选项)。

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 ). 使用operf ,可以尝试使用--separate-cpu / -c选项( 此选项按cpu对样本进行分类 )和--system-wide选项( 此选项用于执行系统范围的配置文件。 ),然后提供cpu:cpulist轮廓规范opreport仅考虑为定号CPU的配置文件 )。

For example: 例如:

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

$ opreport cpu:0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM