powerpoint presentation...• 嵌入式软件开发的挑战 • 英特尔® system studio –...

48
软件工具:针对嵌入式系统的智能软件开发 SFTS003 Yang Y Wang Technical Consulting Engineer, Intel

Upload: others

Post on 14-Mar-2020

26 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

软件工具:针对嵌入式系统的智能软件开发

SFTS003

Yang Y Wang Technical Consulting Engineer, Intel

Page 2: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

2

议程 • 嵌入式软件开发的挑战 • 英特尔® System Studio

– 英特尔® VTune™ Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器 – GDB* 调试器 – SVEN 软件开发工具包 – 英特尔® C++ 编译器 – 英特尔® 集成性能原件 – 英特尔® 数学核心函数库

本课程演示文稿(PDF)发布在技术课程目录网站: intel.com/go/idfsessionsBJ 该网址同时打印于会议指南中专题讲座日程页的上方

Page 3: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

3

议程

• 嵌入式软件开发的挑战 • 英特尔® System Studio

– 英特尔® VTune™ Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器 – GDB* 调试器 – SVEN 软件开发工具包 – 英特尔® C++ 编译器 – 英特尔® 集成性能原件 – 英特尔® 数学核心函数库

Page 4: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

4

越来越多的嵌入式设备

多种风格的Linux*

多种屏幕尺寸 多种用户接口类型 多种类型的开发需求

使用英特尔® Atom™ and Xeon™处理器的智能系统丰富,多样化

Page 5: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

5

嵌入式软件开发特性 区别于传统BIOS

期望更快的硬件启动速度

操作系统多种多样

当前有多种嵌入式系统可供选择

需要底层系统和设备调试 开发过程中通常使用模拟器

编译器 调试器 分析器

比非嵌入式系统开发更加复杂

Page 6: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

6

交叉开发

• 单功能设备

• 定制的Linux* 操作系统

• 定制设备和用户界面

开发主机 ≠ 开发目标机

• 目标设备: KVM, QEMU, Chroot + GUI 重定向, 物理设备

• 目标系统: Yocto Project*, Wind River* Linux, 基于标准Linux*发布的定制系统及其它

• 开发环境: Chroot, Sysroot (MADDE, Poky 及其他)

• 调试和部署: USB, TCP/IP

• Flashing 和系统调试:

– JTAG (In-Target-Probe & Intel® eXtended 调试端口)

– Macraigor Systems*, American Arium*, Wind River, Green Hills Software*, Lauterbach* 及其他

需求多样性

为您的项目尽早计划最好的开发环境配置

主机和目标机配置多样性

Page 7: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

7

集成开发环境的重要性

集成工具套件能带来一致的开发体验, 加速开发过程

Page 8: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

8

英特尔® System Studio 为嵌入式和移动开发人员深入分析系统

加速产品上市

深入分析硬件和软件,以加速开发和

测试过程

增强系统可靠性

利用深度的系统级调试器和分析器来提高代码稳定性

提高电源效率和性能

利用系统级分析器、编译器和函数库来提高系统电源效率

和性能

Page 9: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

9

议程

• 嵌入式软件开发的挑战 • 英特尔® System Studio

– 英特尔® VTune™ Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器 – GDB* 调试器 – SVEN 软件开发工具包 – 英特尔® C++ 编译器 – 英特尔® 集成性能原件 – 英特尔® 数学核心函数库

Page 10: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

10

英特尔® System Studio 是什么?

10

“Wind River is excited about the release of Intel® System Studio which includes support for the Wind River* Linux* operating system”, said Dinyar Dastoor, VP Product Management, Operating Environments at Wind River. “Providing deep insights into Intel® Architecture, these tools help embedded and system developers rapidly implement Wind River Linux solutions that are reliable, responsive and power efficient.”

Page 11: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

11

英特尔® System Studio 为嵌入式和移动开发人员深入分析系统

广泛支持英特尔® 架构

广泛的系统支持

从单核到多核 高性能函数库

SoC, CPU,功耗和性能,

系统和应用程序调试跟踪

动态分析

深入的分析和调试

支持众多英I特尔架构平台

深入的系统级,应用级调试和跟踪,提高系统可靠性

SoC范围内的分析,增强电源使用效率和性能

英特尔C++编译器带来业内领先的性能

大量的高度优化的函数库

* *

* *

提升性能

Page 12: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

12

英特尔® System Studio – 1

† SVEN = System Visible Event Nexus

阶段 组件 功能 优势

验证调试和

Flash

Intel® JTAG 调试器

深入的系统和应用调试 • 操作系统内核软件, 驱动, 中间件, BIOS, UEFI的源码级调试

• SVEN† - 用于调试的超级快速的系统软件SoC跟踪架构

• 深入CPU, SoC和芯片组的调试, 快速定位和解决问题

• 产品代码中做返回路径插桩, 快速解决系统级问题

GDB* 调试器 • 增强的GDB* 应用调试器 • 详细的应用调试和跟踪, 快速解决应用程序问题

Intel® Inspector

• 内存和线程分析提升代码质量 • 提高开发效率和代码质量, 在问题发生之前快速找到内存, 线程以及安全性问题。

调优 Intel® VTune™ Amplifier

深入的软件分析和调优 • SoC 范围内的分析 • 功耗和性能采样 • 在VMM中采样

• SoC 行为的快速深入的分析 • 消除猜测工作, 节省时间, 更简单方便的优化功耗和性能, 找到性能优化机会

• 在资源受限的目标机上深入分析

Page 13: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

13

英特尔® System Studio - 2

† SVEN = System Visible Event Nexus

阶段 组件 功能 优势

开发

英特尔® C++ 编译器

编译器和高性能库

• 高性能C和C++交叉编译器; Intel® Cilk™ Plus 线程运行时

• 针对信号处理, 媒体, 数据处理等高性能软件开发函数集

• 针对FFTs, 线性代数等高性能数学函数库

• 针对基于IA的嵌入式设计提升系统性能, 获取多核及众核的可扩展性能

• 跨平台开发, 与Eclipse*集成, 使用方便

• 提供软件关键开发模块函数库,比如信号处理, 数据和媒体处理等, 加速开发进程, 提高性能

• GCC* 兼容

英特尔® 集成性能原件

英特尔® 数学核心函数库

使用英特尔® System Studio 增强电源效率, 系统稳定性, 提高性能

Page 14: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

14

支持最新的英特尔处理器和SoCs

† Hardware platform debug coverage added as new processors ship † † Hardware events for new processors added as new processors ship

英特尔® Atom™ 处理器

英特尔® 微架构 (Ivy Bridge)

英特尔 微架构(Haswell)

英特尔® JTAG 调试器† – 系统调试

✔ -- --

增强的GDB*调试器– 应用程序调试

✔ ✔ ✔

英特尔® Inspector – 内存和线程分析

✔ Memory & Thread

Analysis

✔ Memory & Thread Analysis

✔ Memory & Thread Analysis

英特尔® VTune™ Amplifier †† – 功耗与性能

✔ Hardware Events

✔ Hardware Events

✔ Hardware Events

英特尔® C++ 编译器 ✔

Intel® SSSE3 ✔

Intel SSE, AVX

✔ Intel SSE, AVX, AVX2,

FMA3

英特尔® 数学核心函数库 --

✔ Intel SSE, AVX

✔ Intel SSE, AVX, AVX2,

FMA3

英特尔® 集成性能原件 ✔ ✔ ✔

Intel® Streaming SIMD Extensions (Intel® SSE); Intel® Advanced Vector Extensions (Intel® AVX); Intel® Advanced Vector Extensions 2 (Intel® AVX2); Intel® Fast Memory Access (Intel® FMA)

Page 15: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

15

功耗与性能分析器

英特尔® System Studio – 英特尔® VTune™ Amplifier

Page 16: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

16

在我的系统中, 哪里

消耗时间? 浪费时间? 等待过长时间? 频繁唤醒?

• 针对最长时间函数优化 • 查看调用栈 • 基于源码查看时间开销

• 基于源码查看缓存缺失 • 根据缓存缺失数据排序查看函数

• 根据等待时间查看锁

• 等待期间使用红/绿显示CPU使用率

• 基于源码查看唤醒原因

• 查看每个core的CPU频率

Intel® VTune™ Amplifier 2013 功耗与性能分析器

“The ability for Intel® VTune™ Amplifier to exactly pinpoint performance bottlenecks in our code was a big time saver and made it a far better choice compared to other analysis tools that we used.”

Jagadish Kamath, Co-founder and Software Architect, RiverSilica* Technologies

针对功耗和可扩展多核性能的高级分析

Page 17: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

17

关键特性

• 监测处理器和SoC事件

– 性能监测单元 (PMU)

– 基于软件

• 远程数据收集 (SSH)

• 采样开销低

• 无需插桩

• 基于源代码或汇编查看结果

使用模式

• 两个模块

− 在开发主机上的Intel VTune Amplifier GUI

− 在目标设备上的Sampling collector

• 在目标设备上收集数据, 在开发主机上分析结果

Intel® VTune™ Amplifier 2013 针对嵌入式系统的功耗与性能分析

针对处理器和SoC级事件跨平台采样

Page 18: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

18

Intel® VTune™ Amplifier 2013 功耗与性能分析器

更多分析数据 • SoC-范围内的分析

– 唤醒&频率

• 基于统计的函数调用次数

• 硬件事件+调用栈 – 低开销, 高准确性

– 在小函数中找到热点

• Intel® Atom™ 处理器, SoC 事件

• Intel® Processor (Ivy Bridge) 事件

• Intel® Processor (Haswell) 事件 – 跟随新处理器发布更新

Activity in CPU

使用简单, 数据丰富, 分析强大

使用简单 • 远程数据收集 • 源码查看内联函数

– 针对 Intel® 和 GCC* 编译器

• Java* 调优 – 结果映射回Java源代码

• 任务标注API – 任务标记和形象化

• 用户自定义指标 – 从事件创建自定义指标

• 自定义热键 – 方便启动和停止收集

• 更多更好的高级分析 (例如,带宽)

Page 19: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

19

Intel® VTune™ Amplifier 2013 SoC整体分析

外围设备多样化 • 用于数据编解码的专用微引擎

• I/O设备众多

• 高级功耗管理

• 通用内存和数据总线系统 High Level Block Diagram of Intel® Atom™ Z2760 SoC

SoC = 处理器多样化 • 多种架构

• 多种不同用处处理器

• 通用内存总线

• 多处理器之间数据交换

查看和访问SoC部件

Page 20: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

20

Intel® VTune™ Amplifier 2013 CPU & SoC整体功耗和性能分析

• 通过最小化唤醒来减少电源功耗

– 定位唤醒来源

应用程序定时触发

硬件中断

显示唤醒比率

– 显示唤醒处理器事件的源代码

– 分析不同IP块与SoC之间的交互开销

– 根据CPU核显示CPU频率。 (CPU频率会根据CPU的活动等级变化)

Select & filter to see a single wake up object:

独立定位唤醒原因, 给出定时器调用栈

Page 21: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

21

调试和验证

英特尔® System Studio – 英特尔® Inspector – 英特尔® JTAG 调试器 – GDB* 调试器 – SVEN 技术开发包

Page 22: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

22

系统调试&验证

内核模式 & 用户模式 • 平台稳定性和启动 • 中间件&引导程序 • Flash 写和修复 • 操作系统和驱动 • 应用程序调试

Page 23: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

23

使用增强GDB* 调试器调试应用程序 针对 英特尔® 架构优化

分支跟踪

• 英特尔® Atom™ 平台记录每个线程的分支路径

• 为单个线程启用或禁止跟踪

• 用于不能立即发现问题时调试

– 不好的指针算法

– 越界访问

• 调试堆栈崩溃问题以及偶发问题

• 快速查看整体控制流

• 汇编显示具体执行路径

快速和专注调试数据竞争及偶发错误

数据竞争探测

• 在调试时随时启用或停用

• 调试数据竞争问题

– 结果错误

– 丢失更新

– 偶发的内存错误

• 对单个数据竞争问题集中调试

• 在GDB* 调试器中高效调试Inspector报告的数据竞争问题

• 发现数据竞争时自动中断

• 执行停止在数据竞争上下文

• 使用分支跟踪与数据竞争探测进行远程调试

• 为Yocto Project* 和 WR Linux* 目标提供预编译GDB* 程序

Page 24: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

24

英特尔® JTAG 调试器 加速系统开发和验证

关键功能 • 实时结合事件跟踪(SVEN)的JTAG 系统调试

• 结合完整的寄存器描述进行比特域修改

• 结合Linux* OS 进行EFI/UEFI 中间件, 引导程序调试

• Flashing 和外围寄存器支持

• 访问页转换和描述表

• 动态加载内核模块调试

• LBR 片上指令跟踪支持

• SMP 执行控制支持

Page 25: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

25

英特尔® JTAG 调试器 页转换表深入内存配置

• 定位内存访问错误原因

• 完整的寄存器描述和控制

• 虚拟和物理地址空间映射和转换

控制内存配置问题和内存泄露

内存地址翻译

快速问题跟踪 • 比特位编辑 • 修改寄存器 • 完整的寄存器描述

“Being able to access the entire processor and peripheral registers documentation within Intel® JTAG Debugger’s bitfield editor is a big time saver when debugging system software.”

James MacGregor, Managing Partner, Macraigor Systems

Page 26: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

26

英特尔® JTAG 调试器 Flashing 目标镜像&启动引导

Flash内存工具 • 广泛的闪存类型支持 – NOR 和 NAND

• Flash 二进制文件和hex 文件

• 损坏的flash恢复机制 – 英特尔® 凌动™ 处理器 CE5300

• 备份flash内容到主机二进制文件

• 消除/解锁/加锁 模块

• 快速BIOS更新的理想工具

Flash 内存 • 烧写 • 清除/解锁 • 备份

使用简单 • 多种flash类型 • NOR & NAND

更新关键的系统软件组件, 使用简单

Page 27: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

27

英特尔® JTAG 调试器 指令跟踪支持

从什么地方开始出现错误?

• 英特尔® 凌动™ 处理器支持 Last Branch Record (LBR)

• 在OS信号事件处理程序设置断点

• 展开执行流程一直到堆栈溢出或段错误

• 根据流程反向跟踪到正确执行位置

• 重新执行到该位置, 分析内存访问

27

展开已执行流, 快速地位问题

Page 28: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

28

System Visible Event Nexus (SVEN) 是什么?

• 基于跟踪的软件插桩

– 插入代码,允许记录关键系统事件

• 详细的 SoC & CPU 系统视角

– 多核 (IA, DSP, 其他)

– 用户态和内核态代码

• 采样开销极低

– 大致十分之一微妙

– 定义明确的事件结构

– 可以保留在产品代码中 • 结合JTAG追踪事件 • 智能断点

– 在关键事件点中断执行

对访问SoC和CPU的关键软件组件进行监测的超快,安全的动态技术

• 形象化的分析和调试系统事件路径 – 命令行接口 – 图形用户接口

超快的SoC软件事件追踪机制, 快速解决问题

Page 29: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

29

SVEN – 您的系统诊断工具 通过 JTAG追踪系统和SoC

跟踪路径形象化

• 高级的导航, 搜索和过滤工具

• 图形和文字事件显示

• 用户控制路径分组

智能事件触发器

• 结合事件路径实时JTAG 系统调试

• 在追踪事件调用点智能中断

• 设置智能断点以便深入分析

例如:

– 中断在任何USB驱动相关事件

– 中断在所有以 “ERROR”开头的调试字符

– 如果寄存器X被访问, 中断

– 如果寄存器X的比特位 [7-9] 的值是0b101 , 中断

• 时间线视图 • 搜索和过滤 • 智能事件触发器定义

通过强大的JTAG和事件追踪技术增强系统稳定性

Page 30: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

30

英特尔® Inspector 2013 动态分析查找内存和线程错误 查找和消除错误

• 内存泄露, 非法访问…

• 数据竞争和死锁

• 堆增长分析

使用更快速, 简单

• 远程数据收集

• 调试器中断

– 在选定错误中断

– 快速定位到已知错误

• 暂停/恢复收集

– 关注精密分析

– 更好性能

增强的错误消除

支持嵌入式Linux* 操作系统

在修复代价小的时候找到错误

“Intel® Inspector found both memory and thread errors that could take days to find without it.” Ashley Driver, Solutions and Application Architect, Altech Multimedia

Page 31: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

31

英特尔® Inspector 2013 堆增长分析

应用程序的内存使用奇妙增长?

• 设置开始和结束点作为分析区间

– 使用按钮, 或者

– 使用API

• 查看分析区间的未释放内存分配

• 快速将注意力集中在对造成堆增长的疑似行为

加速分析复杂堆错误

Page 32: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

32

提升性能

英特尔® System Studio

– 英特尔® C++ 编译器

– 英特尔® 集成性能原件

– 英特尔® 数学核心函数库

Page 33: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

33

英特尔® C++ 编译器 提升性能

高性能

• 通过出色的Intel® AVX 和 Intel® AVX2 指令产生更快代码

• Intel® Cilk™ Plus: 并行与向量化

• 尽可能的减少执行时间是开发低功耗程序的关键

标准与交叉开发环境支持

• Intel® C++ 编译器支持 GNU* 交叉编译

• 与Eclipse* CDT, 基于Poky-Linux* 的Yocto Project* ADT 集成

• 完整支持 C99 和 C++ 11

跨平台, 高性能, 与GNU 兼容

Page 34: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

34

优化基本步骤

关闭优化编译程序

使用通用优化

使用处理器特性优化

使用过程间优化

使用导引优化

自动向量化调优

1.

2.

3.

4.

5.

6.

Page 35: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

35

Intel® C++ Compiler 处理器特性优化 通过 -x 选项

Feature Extension

Intel® Streaming SIMD Extensions 2 (Intel® SSE2), 支持最初的 奔腾® 4 或者兼容的非英特尔处理器

sse2

Intel Streaming SIMD Extensions 3 (Intel SSE3), 支持奔腾 4 或兼容的非英特尔处理器

sse3

Supplemental Streaming SIMD Extensions 3 (SSSE3) , 支持 英特

尔® 酷睿™2 Duo 处理器 ssse3

Intel SSE4.1 首次引入在 英特尔® 酷睿™ microarchitecture 45nm Hi-K sse4.1

Intel SSE4.2 Accelerated String 和字符处理指令, 支持 英特尔® 酷睿™ i7 processors

sse4.2

英特尔® 凌动™ 处理器支持: Intel SSSE3 and MOVBE 指令 ssse3_atom

Intel® Advanced Vector Extensions (Intel® AVX) 支持二代英特尔酷睿处理器家族

avx

Page 36: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

36

Interprocedural Optimizations 跨文件优化

编译 & 优化

编译 & 优化

编译 & 优化

编译 & 优化

file1.c

file2.c

file3.c

file4.c

不使用 IPO

编译 & 优化

file1.c

file4.c file2.c

file3.c

使用 IPO

-ip 单文件, 不同模块间优化

-ipo 整个应用程序, 多个文件模块间优化

Page 37: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

37

Profile-guided Optimizations (PGO)

• 静态分析受限:

– x > y的频率?

– count的大小?

– 哪部份代码被执行和频率?

• 使用PGO优化:

– 更准确的分支预测

– 更好的函数内联决策(帮助IPO优化)

– 更好的基本快移动可以提升指令缓存行为

– 更多…

• 选项: -prof-gen, -prof-use, -prof-dir

if (x > y) do_this(); else do that();

for(i=0; i<count; ++i)

do_work();

Page 38: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

38

自动并行引导

Page 39: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

39

Intel® Cilk™ Plus 简化并行

Intel® Cilk™ Plus

• 用于并行的3个简单关键字和数组标记 • 支持任务并行和数据并行 • 和线性代码类似语义

• 并行您的代码, 提升性能的简单方法 • 顺序一致, 低开销, 强大的解决方案 • 支持C, C++

What

Features

Why

简化任务和数据并行的语言扩展

Compilers & Libraries

更简单的任务和数据并行

Page 40: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

40

为性能和功耗优化

•使用Intel® SSSE3, SSE, 和 AVX 指令集高度优化

•性能超出单独编译器优化

节省开发时间

•随时使用

•针对当前和过去的处理器完整优化

•节省开发,调试和维护时间

•当前开发一次, 享用将来的优化

大量的跨平台和OS功能

•大量高度优化的信号,数据和媒体处理函数

•广泛的嵌入式Linux* 目标操作系统支持

•支持 Intel® Atom™, Core™ 和 Xeon® processors

英特尔® 集成性能原件(Intel ® IPP)

提升嵌入式系统性能的基本性能构建模块

Intel® Streaming SIMD Extensions (Intel® SSE) Intel® Advanced Vector Extensions (Intel® AVX)

Page 41: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

41

英特尔® 集成性能原件(Intel ® IPP) Intel® AVX性能提升

Page 42: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

42

英特尔® 数学核心函数库 (Intel® MKL) 针对英特尔® 酷睿™ & 至强™ 处理器

33% of math libraries users rely on Intel’s Math Kernel

Library

EDC North America Development Survey

2011, Volume II • 高度优化的多线程数学函数

• 使用Intel® AVX 和 最近Intel® Advanced Vector Extensions 2 (Intel® AVX2) 包括新的 FMA3 指令优化

• 针对嵌入式Linux*目标使用Intel® 数学核心函数库 (Intel® MKL) 包括通讯, 医疗, 工业和其他领域

• 支持Intel® C++ Compiler 和 GCC*

使用Intel MKL释放处理器性能

Page 43: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

43

英特尔® 数学核心函数库 快速傅里叶变换(FFT)性能提升

Page 44: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

44

总结 – 英特尔® System Studio

Eclipse* • 设置开发环境, 为您的跨平台开发环境配置英特尔® System Studio

英特尔® C++ 编译器和 性能库

• 使用英特尔编译器和英特尔® Cilk™ Plus 并行编程提升程序性能 • 使用英特尔集成性能基元和英特尔数学核心函数库提升信号处理,媒体和数据处理性能 • 使用性能库所支持的Intel® SSE3, SSE, AVX, AVX2, FMA3 微架构特性提升性能 • 利用高级向量化提升性能

英特尔® JTAG & GDB*

调试器

• 深入底层系统软件调试和软件跟踪, 增强系统稳定性 • 深入观察向量化数据和SIMD寄存器 • 定位单线程和多线程的运行时错误, 比如内存泄露, 堆栈溢出, 异常以及其他算法问题

英特尔® VTune™ Amplifier

• 深入处理器和SoC整体分析和优化您的代码, 提高电源效率和性能 • 获得您的代码在英特尔处理器和SoC系统上运行的详细分析, 定位处理器和SoC唤醒操作, 性能瓶颈, 分析并行度, 优化单线程或多线程程序, 提升性能和功耗效率

英特尔®

Inspector

• 为单线程或多线程程序设计的功能强大, 易于使用的内存和线程错误检查工具。提高应用稳定性,定位偶发的或者不确定的问题

设计

实现

验证

优化

Intel® Streaming SIMD Extensions (Intel® SSE); Intel® Streaming SIMD Extensions 3(Intel® SSE3); Intel® Advanced Vector Extensions (Intel® AVX); Intel® Advanced Vector Extensions 2 (Intel® AVX2);

Page 46: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

46

Legal Disclaimer INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. • A "Mission Critical Application" is any application in which failure of the Intel Product could result, directly or indirectly, in

personal injury or death. SHOULD YOU PURCHASE OR USE INTEL'S PRODUCTS FOR ANY SUCH MISSION CRITICAL APPLICATION, YOU SHALL INDEMNIFY AND HOLD INTEL AND ITS SUBSIDIARIES, SUBCONTRACTORS AND AFFILIATES, AND THE DIRECTORS, OFFICERS, AND EMPLOYEES OF EACH, HARMLESS AGAINST ALL CLAIMS COSTS, DAMAGES, AND EXPENSES AND REASONABLE ATTORNEYS' FEES ARISING OUT OF, DIRECTLY OR INDIRECTLY, ANY CLAIM OF PRODUCT LIABILITY, PERSONAL INJURY, OR DEATH ARISING IN ANY WAY OUT OF SUCH MISSION CRITICAL APPLICATION, WHETHER OR NOT INTEL OR ITS SUBCONTRACTOR WAS NEGLIGENT IN THE DESIGN, MANUFACTURE, OR WARNING OF THE INTEL PRODUCT OR ANY OF ITS PARTS.

• Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined". Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.

• The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.

• Intel product plans in this presentation do not constitute Intel plan of record product roadmaps. Please contact your Intel representative to obtain Intel's current plan of record product roadmaps.

• Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. Go to: http://www.intel.com/products/processor_number.

• Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. • Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be

obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm • Ivy Bridge, Haswell and other code names featured are used internally within Intel to identify products that are in development

and not yet publicly announced for release. Customers, licensees and other third parties are not authorized by Intel to use code names in advertising, promotion or marketing of any product or services and any such use of Intel's internal code names is at the sole risk of the user

• Intel, Core, Atom, VTune, Xeon and the Intel logo are trademarks of Intel Corporation in the United States and other countries.

• *Other names and brands may be claimed as the property of others. • Copyright ©2013 Intel Corporation.

Page 47: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

47

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804

Page 48: PowerPoint Presentation...• 嵌入式软件开发的挑战 • 英特尔® System Studio – 英特尔® VTune Amplifier – 英特尔® Inspector – 英特尔® JTAG 调试器

48

Risk Factors The above statements and any others in this document that refer to plans and expectations for the first quarter, the year and the future are forward-looking statements that involve a number of risks and uncertainties. Words such as “anticipates,” “expects,” “intends,” “plans,” “believes,” “seeks,” “estimates,” “may,” “will,” “should” and their variations identify forward-looking statements. Statements that refer to or are based on projections, uncertain events or assumptions also identify forward-looking statements. Many factors could affect Intel’s actual results, and variances from Intel’s current expectations regarding such factors could cause actual results to differ materially from those expressed in these forward-looking statements. Intel presently considers the following to be the important factors that could cause actual results to differ materially from the company’s expectations. Demand could be different from Intel's expectations due to factors including changes in business and economic conditions; customer acceptance of Intel’s and competitors’ products; supply constraints and other disruptions affecting customers; changes in customer order patterns including order cancellations; and changes in the level of inventory at customers. Uncertainty in global economic and financial conditions poses a risk that consumers and businesses may defer purchases in response to negative financial events, which could negatively affect product demand and other related matters. Intel operates in intensely competitive industries that are characterized by a high percentage of costs that are fixed or difficult to reduce in the short term and product demand that is highly variable and difficult to forecast. Revenue and the gross margin percentage are affected by the timing of Intel product introductions and the demand for and market acceptance of Intel's products; actions taken by Intel's competitors, including product offerings and introductions, marketing programs and pricing pressures and Intel’s response to such actions; and Intel’s ability to respond quickly to technological developments and to incorporate new features into its products. The gross margin percentage could vary significantly from expectations based on capacity utilization; variations in inventory valuation, including variations related to the timing of qualifying products for sale; changes in revenue levels; segment product mix; the timing and execution of the manufacturing ramp and associated costs; start-up costs; excess or obsolete inventory; changes in unit costs; defects or disruptions in the supply of materials or resources; product manufacturing quality/yields; and impairments of long-lived assets, including manufacturing, assembly/test and intangible assets. Intel's results could be affected by adverse economic, social, political and physical/infrastructure conditions in countries where Intel, its customers or its suppliers operate, including military conflict and other security risks, natural disasters, infrastructure disruptions, health concerns and fluctuations in currency exchange rates. Expenses, particularly certain marketing and compensation expenses, as well as restructuring and asset impairment charges, vary depending on the level of demand for Intel's products and the level of revenue and profits. Intel’s results could be affected by the timing of closing of acquisitions and divestitures. Intel’s current chief executive officer plans to retire in May 2013 and the Board of Directors is working to choose a successor. The succession and transition process may have a direct and/or indirect effect on the business and operations of the company. In connection with the appointment of the new CEO, the company will seek to retain our executive management team (some of whom are being considered for the CEO position), and keep employees focused on achieving the company’s strategic goals and objectives. Intel's results could be affected by adverse effects associated with product defects and errata (deviations from published specifications), and by litigation or regulatory matters involving intellectual property, stockholder, consumer, antitrust, disclosure and other issues, such as the litigation and regulatory matters described in Intel's SEC reports. An unfavorable ruling could include monetary damages or an injunction prohibiting Intel from manufacturing or selling one or more products, precluding particular business practices, impacting Intel’s ability to design its products, or requiring other remedies such as compulsory licensing of intellectual property. A detailed discussion of these and other factors that could affect Intel’s results is included in Intel’s SEC filings, including the company’s most recent Form 10-Q, report on Form 10-K and earnings release. Rev. 1/17/13