能够使用VTune分析.ppt

上传人:小飞机 文档编号:5818218 上传时间:2023-08-23 格式:PPT 页数:37 大小:521KB
返回 下载 相关 举报
能够使用VTune分析.ppt_第1页
第1页 / 共37页
能够使用VTune分析.ppt_第2页
第2页 / 共37页
能够使用VTune分析.ppt_第3页
第3页 / 共37页
能够使用VTune分析.ppt_第4页
第4页 / 共37页
能够使用VTune分析.ppt_第5页
第5页 / 共37页
点击查看更多>>
资源描述

《能够使用VTune分析.ppt》由会员分享,可在线阅读,更多相关《能够使用VTune分析.ppt(37页珍藏版)》请在三一办公上搜索。

1、VTune Performance Analyzer 6.0,目标,能够使用VTune分析软件的性能瓶颈,AGENDA,Introduction TerminologySamplingCall GraphCounter MonitorVTune on Linux,VTune Performance Analyzer,帮助你找出性能方面问题Bottlenecks in algorithmsBottlenecks due to data layoutApplication architecture bottlenecksSystem-Level and hardware bottlenecks,A

2、GENDA,IntroductionTerminologySamplingCall GraphCounter MonitorVTune 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 co

3、de(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性能分析工具可以帮助你分

4、析应用程序的性能。但是简单的知道hotspot的位置是不够的,你必须知道什么导致hotspot的产生,怎样改进通过对热区的进一步分析,你可以跟踪关键的函数调用,监控特殊的处理器事件,如cache miss,Hotspot与Bottleneck的区别,Bottleneck 是系统中性能受到约束的位置VTune Performance Analyzer帮助你找到并删除 Bottlenecks.找到软件Hotspots 是一个分析方法,帮助你定位 Bottlenecks.,性能优化方法,三种数据收集器,samplingcall graphcounter monitor,Two Ways toTrac

5、k Location,Problem:我需要知道你在哪花费了多长时间Statistical Solution:我每30分钟呼叫你Instrumentation Solution:每个地方有一个特殊的电话点,你每到一个地点向我报告,The Statistical Solution:I Call You!,ADVANTAGES:低开销:没有太多的中断没有建站点的开销无论你在那里都能精确定位DISADVANTAGES:如果你的双手拿满东西,我必须等待你可能第一次没有听到铃声,所以我不能精确确定我呼叫你时,你在那里,由于你不经常去有一些地方,我可能根本不知道你去过,The Instrumentatio

6、n Solution:You call me when you get there!,ADVANTAGES:你到达新的地方我能立刻知道我知道你在一个地方呆了多长时间我知道你到达同一个地方多少次DISADVANTAGES:不知道你在街道内做了什么粒度:站点浪费了大量时间打电话建立站点扩大了街道空间,识别Hotspots,Sampling Data Collector The Statistical Solution描述执行的一个侧面(柱状图)低开销Call Graph Data Collector The Instrumentation Solution函数的时间信息函数调用者和被调用者的关系比

7、sampling的开销高,三种性能监控方式的比较,VTune Projects,什么是 Project?Project 由一个或多个Activities组成什么是Activity?包含你应用程序的信息和希望运行的数据收集器信息,Projects are organized like this:,AGENDA,Introduction/Whats New in 6.0TerminologySamplingCall GraphCounter MonitorVTune on Linux,Sampling Technology,打断处理器的执行,获得执行上下文中断可以是周期性的,如每秒1,000次采样

8、采样的触发 Event Based Sampling(EBS).采样事件:处理器相关事件,如 L2 Cache Misses,Branch Mispredictions,Floating-point instructions retired,etc.,Lab 1:gzip Sampling Analysis,Introduces EBS and Sampling UIgzip is an open source file compression program,Select New Project,Select Sampling Wizard and then OK,Select Win32*

9、/Win64*/Linux*Profiling radio button and then OK,Remember each Activity has its own Application/Module Profile,Browse to the application:gzip.exeThe command line arguments are:-f testfile.datCheck Modify default configurationClick on Finish,Modify the Sampling Activity,Select the Sampling check box.

10、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.0TerminologySamplingCall GraphCounter MonitorVTune on Linux,根据总时间找到关键路径,AGENDA,Introduction/Whats New in 6.0TerminologySamplingCall GraphCounter MonitorVTune on Linu,根据占处理器时间找hotspot,修改代码进行优化,AGENDA,Introduction/Whats New in 6.0TerminologySamplingCall GraphCounter MonitorVTune on Linux,VTune on Linux,在Linux上安装Sampling Driver在Linux上启动VTune server在Windows上进行远程收集,链接,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号