Loading

虚拟机Linux使用perf stat提示cycles not supported

问题描述

项目希望评估算法的CPU开销,使用linux常用的perf工具。
查看perf stat只显示cpu-clock, context-switches, cpu-migrations
剩余cycles, instructions, branches, branch-misses均为not supported

原因分析

该参数使用物理机可测量,猜测问题出在虚拟化。

解决方案

关闭VMware虚拟机电源,找到硬件配置选项中CPU
勾选☑️虚拟化CPU性能计数器重启问题解决

posted @ 2020-11-02 11:26  azureology  阅读(3215)  评论(0编辑  收藏  举报