Intel(R) Inspector XE 2013 帮助用户进行线程检查,包含:线程间的共享数据冲突和死锁的检测。
当选择”Locate Deadlocks and Data Races“选项时,工具额外开销加程序本身达到原来的40-160倍。在新版的Inspector XE中,使用了新的技术实现。在错误丢失率极小的情况下,实现了软件性能的整体快速提升。这一重大改进,对于目标项目非常大的用户来说,有积极意义。(注:减少分析过程的时间,还可以使用”-include“开关或”-exclude“开关,聚焦于某个或某几个模块)
以下使用Inspector XE附带的例子,来比较一下性能。
1. 程序本身的性能
# ./tachyon.find_and_fix_threading_errors
Using Default Image file?
CPU Time: 0.050 seconds.
2. 使用老的Inspector检测,花费的CPU时间(此处使用”use-maximum-resource“ 开关,工具就使用老的算法)
# inspxe-cl -collect ti3 -knob use-maximum-resources=true -- ./tachyon.find_and_fix_threading_errors
Using Default Image file
CPU Time: 3.117 seconds.
2 new problem(s) found
2 Data race problem(s) detected
3. 使用Inspector中新的算法检测,花费的CPU时间
# inspxe-cl -collect ti3 -- ./tachyon.find_and_fix_threading_errors
Using Default Image file
CPU Time: 1.961 seconds.
2 new problem(s) found
2 Data race problem(s) detected
从中可以看出,新的算法节省了三分之一的CPU时间。
Image de l’icône:
