我正在尝试在我的主机上执行perf。
操作系统:Ubuntu 15.04
Perf命令:
$manager = Get-ADGroup -filter {Distinguishedname -eq $adgroup.manager}
if($($manager.enabled) -eq $false)
{
结果:缓存未命中率100%
CPU:Intel Xeon Processor D-1520
我还没弄清楚为什么缓存未命中率可以达到100%,但我怀疑这个问题可能与CPU有关。有什么想法吗?
我不确定cachegrind是否会执行与perf类似的缓存分析。在cachegrind中,事情有效,与其他平台相比,我的平台没有太大的区别。
cachegrind消息
CPU信息
答案 0 :(得分:0)
只想在Ubuntu 15.04 64位机器Intel i7-3770 CPU上分享我的测试。测试似乎没问题。
perf stat -B -e cache-references,cache-misses,cycles,instructions,branches,faults,migrations sleep 5`
Performance counter stats for sleep 5:
15,375 cache-references
1,790 cache-misses # 11.642 % of all cache refs
897,607 cycles
684,540 instructions # 0.76 insns per cycle
139,092 branches
58 faults
0 migrations
5.001000990 seconds time elapsed
我的电脑上的Linux内核版本:
$ uname -a
Linux plex 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11 14:16:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
安装软件安装perf:
sudo apt-get install linux-tools-common
sudo apt-get install linux-tools-generic
sudo apt-get install linux-tools-3.19.0-26-generic
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Model name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
Stepping: 9
CPU MHz: 1601.851
CPU max MHz: 3900.0000
CPU min MHz: 1600.0000
BogoMIPS: 6784.60
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
NUMA node0 CPU(s): 0-7