了解VTune报告 [英] Understanding VTune report

查看:226
本文介绍了了解VTune报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个对现有线程的跟进(http://stackoverflow.com/questions/12724887/caching-in-a-high-performance-financial-application) - 我发现它不是阻碍我的应用程序的缓存。为了削减长篇小说,我有一个应用程序,在一个函数中花费70%的运行时间(22秒中的15秒)。因此,我想尽可能多地削减这个函数的运行时间,因为该函数的设想的使用是用于更大的数据(即22秒不是计划的运行时间)。

this is a followup to an existing thread (http://stackoverflow.com/questions/12724887/caching-in-a-high-performance-financial-application) - I found that it's not the cache that hinders my application. To cut the long story short, I have an application which spends 70 percent of the runtime in one function (15 seconds out of 22). Hence, I would like to cut the runtime of this function as much as possible as the envisaged use of the function is for MUCH larger data (i.e. 22 seconds is not the planned runtime:)

问题是,VTune的输出使我困惑,代码似乎在绝对意想不到的地方花费了大量的时间。我已经用完了想法,所以我发布我的项目加上profiler的结果在这里。

The problem is that VTune's output puzzles me, the code seems to spend a huge deal of time in absolutely unexpected places. I have run out of ideas, so Im posting my project coupled with profiler results here.

看看所谓的evaluateExits()函数,这些东西让我难过:

Taking a look at the incriminated evaluateExits() function, these things puzzle me:

1 /恰好花费2.2s调用一个内联函数,返回1,而不管参数(行425,this-> contractManager-> contractCount())。注意:函数返回1的版本,不管params是可能的情况之一,所以我不能把contractCount = 1,并保持这样。可以从虚拟表指针的重定向吃了那些2.2秒(contractCount()是一个虚拟方法)?

1/ the function happens to spend 2.2s on calling an inline function that returns 1 regardless of parameters (line 425, this->contractManager->contractCount()). Note: the version where the function returns 1 regardless of params is one of the possible cases so I can't put "contractCount=1" and leave it like that. Can the redirection from a virtual table pointer eat up those 2.2 seconds (contractCount() is a virtual method)?

2 /函数在min(uint1,uint2)(第432行)上花费3.3s,尽管Im使用的wmin版本应该尽可能的CPU友好。

2/ the function spends 3.3s on min(uint1, uint2) (line 432) despite Im using a version of wmin that should be as CPU friendly as possible.

3 /函数在行512上花费1.6s,这是一个非常简单的操作,被调用的函数不是虚拟函数。

3/ the function spends 1.6s on line 512 which is a very trivial operation and the function being called is not a virtual one..

所以问题是:为什么这三行代码需要这么多时间?我俯瞰什么?如何优化我的代码,使其运行更快?我应该用适用于整个数组的SSE版本的min替换wmin()吗?

So the questions are: why do these three lines of code take so much time? What am I overlooking? And how could I optimize my code to make it run faster? Should I replace the wmin() by a SSE version of min applied to whole arrays?

任何输入都非常感谢。
Daniel

Any input is much appreciated. Daniel

编辑:
看看程序集,我发现在1 / case是使代码慢的vfptr。我替换了一个虚拟函数的调用,由一个快速失败的Don Clugston的,但没有任何性能变化发生了什么(我没有线索为什么)。由于夜莺的评论,附件现在应该包含所有必需的文件。但是,二进制文件不能成功运行,因为它连接到共享内存,其中有100 MB的数据。

Taking a look into the assembly, I found that in the 1/ case it really is the vfptr that makes the code "slow". I replaced the call of a virtual function by a fastdelegate of Don Clugston's but no performance change whatsoever occured (I have no clue why). Due to Nightingale's comment the attachments should now contain all the files necessary. However, the binary cannot be run successfully, as it connects to shared memory where there are 100's of MB of data.

所以,我附加整个项目加上VTune的结果此处此处

So, I attach the whole project coupled with VTune's results here and here

推荐答案

Daniel,

我想看看你的VTune结果,但遗憾的是,二进制模块,其结果是收集的,所以我不能看看这里应该是最有价值的程序集。您可以重新发布您的项目档案与二进制文件和调试信息文件包括?

I wanted to take a look at your VTune results but unfortunately you did not include the binary module for which the result was collected, so I couldn't look into the assembly that should be of greatest value here. Can you re-post your project archive with binary file and debug information file included?

我也尝试重新构建您的源,但一些头文件不能找到:

I also attempted to re-build your sources, but a number of header files could not be found:


  • 一些Qt标头(我没有安装Qt,不是专家)

  • parameterHolder.h文件

  • externFloatConsts.h文件

为了帮助它有好的这些文件或用于收集数据的二进制文件。

So, in order to help it would be good to have these files or the binary that was used to collect the data.

这篇关于了解VTune报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆