能够使用VTune分析.ppt_第1页
能够使用VTune分析.ppt_第2页
能够使用VTune分析.ppt_第3页
能够使用VTune分析.ppt_第4页
能够使用VTune分析.ppt_第5页
已阅读5页,还剩32页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

VTune Performance Analyzer 6.0,目标,能够使用VTune分析 软件的性能瓶颈,AGENDA,Introduction Terminology Sampling Call Graph Counter Monitor VTune on Linux,VTune Performance Analyzer,帮助你找出性能方面问题 Bottlenecks in algorithms Bottlenecks due to data layout Application architecture bottlenecks System-Level and hardware bottlenecks,AGENDA,Introduction Terminology Sampling Call Graph Counter Monitor VTune on Linux,什么是 Hotspot?,Where in an application/system where there is a significant amount of activity(有大量活动发生的地方) Where = address in memory = OS process = OS thread = executable file or Module = user function (requires symbols) = line of source code (requires symbols with line numbers) or processor (assembly) instruction.(定位到指令) Significant = if it doesnt happen often it probably doesnt have much impact on the systems performance. Activity = time spent or other internal processor event.,什么是Hotspot?,hotspot是你的代码花费很长时间执行的区域。 通过定位hotspot,VTune性能分析工具可以帮助你分析应用程序的性能。 但是简单的知道hotspot的位置是不够的,你必须知道什么导致hotspot的产生,怎样改进 通过对热区的进一步分析,你可以跟踪关键的函数调用,监控特殊的处理器事件,如cache miss,Hotspot与Bottleneck的区别,Bottleneck 是系统中性能受到约束的位置 VTune Performance Analyzer帮助你找到并删除 Bottlenecks. 找到软件Hotspots 是一个分析方法,帮助你定位 Bottlenecks.,性能优化方法,三种数据收集器,sampling call graph counter monitor,Two Ways to Track Location,Problem: 我需要知道你在哪花费了多长时间 Statistical Solution: 我每30分钟呼叫你 Instrumentation Solution: 每个地方有一个特殊的电话点,你每到一个地点向我报告,The Statistical Solution: I Call You!,ADVANTAGES: 低开销: 没有太多的中断 没有建站点的开销 无论你在那里都能精确定位 DISADVANTAGES: 如果你的双手拿满东西,我必须等待 你可能第一次没有听到铃声,所以我不能精确确定我呼叫你时,你在那里,由于你不经常去有一些地方,我可能根本不知道你去过,The Instrumentation Solution: You call me when you get there!,ADVANTAGES: 你到达新的地方我能立刻知道 我知道你在一个地方呆了多长时间 我知道你到达同一个地方多少次 DISADVANTAGES: 不知道你在街道内做了什么 粒度:站点 浪费了大量时间打电话 建立站点扩大了街道空间,识别Hotspots,Sampling Data Collector The Statistical Solution 描述执行的一个侧面(柱状图) 低开销 Call Graph Data Collector The Instrumentation Solution 函数的时间信息 函数调用者和被调用者的关系 比sampling的开销高,三种性能监控方式的比较,VTune Projects,什么是 Project ? Project 由一个或多个Activities组成 什么是Activity ? 包含你应用程序的信息和希望运行的数据收集器信息,Projects are organized like this:,AGENDA,Introduction / Whats New in 6.0 Terminology Sampling Call Graph Counter Monitor VTune on Linux,Sampling Technology,打断处理器的执行,获得执行上下文 中断可以是周期性的, 如每秒1,000次采样 采样的触发 Event Based Sampling (EBS). 采样事件:处理器相关事件,如 L2 Cache Misses, Branch Mispredictions, Floating-point instructions retired, etc.,Lab 1: gzip Sampling Analysis,Introduces EBS and Sampling UI gzip is an open source file compression program,Select New Project,Select Sampling Wizard and then OK,Select Win32*/Win64*/Linux* Profiling radio button and then OK,Remember each Activity has its own Application/Module Profile,Browse to the application: gzip.exe The command line arguments are: -f testfile.dat Check Modify default configuration Click on Finish,Modify the Sampling Activity,Select the Sampling check box. Click on Configure,Uncheck Calibrate Sample After Value checkbox,Why do this?,Click OK to run the activity,根据采样次数找到hotspot,AGENDA,Introduction / Whats New in 6.0 Terminology Sampling Call Graph Counter Monitor VTune on Linux,根据总时间找到关键路径,AGENDA,Introduction / Whats New in 6.0 Terminology Sampling Call Graph Counter Monitor VTune on Linu,根据占处理器时间找hotspot,修改代码进行优化,AGENDA,Introduction / Whats New in 6.0 Terminology Sampling Call Graph Counter Monitor VTune

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论