vtune

多核程序探秘- false sharing及使用vtune验证

多核程序探秘(1) false sharing及使用vtune验证

多核开发中常见的一个问题是false sharing(失效共享),这个问题让我们用一个全新的角度来看待多核程序的编写,这个角度就是硬件的角度。

Intel Core 2 Duo处理器平台上, L2 cache是由两个core共享的,而L1 data cache是分开的,由两个core分别存取。cache line的大小是64 Bytes。当不同的线程同时读写不同的,看起来更不相关的2个变量时,由于这2个变量实际保存在同一条cache line上,从而会暗地里造成cache line的访问冲突而导致潜在的性能损失。例如这段代码:

unsigned char VectorA[10];
unsigned char VectorB[10];

UINT MyThreadProcA( LPVOID pParam )
{
unsigned long long myCounter = 100000000;
while(--myCounter)
{
for (int i=0; i<10; ++i)
{

Quick Intel® Core™ i7 platform tuning

I hope you are all enjoying the new Intel® Core™i7 platforms.  Most people are very pleased with the performance of these new platforms.  I hope all of you software developers are regular VTune Analyzers users too (but I know not all of you are).     One of the great advantages of VTune Analyzer’s event based sampling feature is that it doesn’t just show you where your code spends the most cpu time, it helps you understand why.  When you understand why you can better make changes that will improve performance.   Dr.

在MID上安装Intel® Vtune™ Performance Analyzer样本采集器

英文版本的安装指南可以在此下载

使用安装脚本

注意:在安装期间您将看到以下选项

a> would you like to have the VTune driver automatically load at the kernel boot time?(y/n)[y]…选择y或者根据您的需要进行选择

b> would you like to try and build the driver?(y/n)[y]………………….选择y

c> would you like to load the new VTune driver now?(y/n)[y]……………选择y或者根据您的需要进行选择

1) 以超级用户身份登录目标MID Linux*系统。

2) 将Intel® Vtune™ Performance Analyzer for MID目标包复制Linux系统并解压:

 

  • vtune
  • Mobilität
  • Intel® Atom™ Prozessoren
  • 将VTune™ Performance Analyzer的样本采集器应用于MID的用户指南

    应用于移动网络设备(Mobile Internet DeviceMID)的VTunePerformance Analyzer的样本数据采集器是一个独立的命令行工具,它可以在本地系统中提供基于事件采样(event-based samplingEBS)的功能。这种基于硬件的采样是一种低开销、系统级的剖析,通过在操作系统和应用上逐项查看,它可以帮助您确定最消耗时间的模块和功能。

     

    本用户指南的目的是对样本采集器的命令行选项做一个全面的介绍,指导使用者应用这些选项获取更多有用的内容。下载用户指南的PDF格式版本。

     

  • vtune
  • Mobilität
  • Intel® Atom™ Prozessoren
  • Seiten

    vtune abonnieren