In order to learn how Vtune works, I am trying to analyze assembly commands’ running time of the pre-build "matrix.exe". I have several problems:
- By performing memory access analysis I receive running times of matrix.exe’s functions but cannot see some of the function’s name (e.g some of the matrix.exe functions appear as func@0X1400345 while other functions appear with their actual name “init”, “multipy”, etc..)
- By performing hotspots analysis, the output indeed contains all the functions names. However, now all the running times are ‘0’ or “unknown”
I would like to know what I am doing wrong and how to fix it.
Another question - I want to demonstrate Vtune's capabilities to my colleagues and having problem to analyze my original C++ exe files. I would like to know where I can find existing files just like "matrix.exe" that by performing the analysis on them I will probably receive reasonable and informative results.
The func@0X1400345 functions you see are most likely not from matrix.exe but from system modules (like ntoskrnl) for which you don't have debugging symbols. The CPU Time metric value for them should be very low for the matrix sample so you can ignore them and focus only on function from the matrix.exe module. To make it easier you can change the grouping in the grid from 'Function / Callstack' to 'Module / Function / Callstack' and expand the matrix.exe row.
Not sure what you mean by all running times are 0 or unknown. Can you post as screenshot?
And what problems exactly you have with analyzing your own applications?
Thanks for reaching out.
Hope Dmitry Ryabtsev (Intel) has answered your question and regarding code samples you can refer the below two links
Thank you very much for your responses and your help!
As for the matrix.exe functions' name - it seems that some of the "func@0X1400345" functions do belong to matrix.exe. it can be seen in the attached files - some of the functions that appear with their original name in hotspots analysis will appear as "func@0X1400345" in memory access analysis (the only functions that appears in both of them are "init_arr", "multiply1").
As for my own applications - I think that maybe i'm missing something. Is there anything special i should do while compiling my application before performing Vtune analysis? for example, is it enough to debug and compile my application using visual studio and analyze the exe file, or should I change something in my visual studio preferences before compiling in order to Vtune to analyze it properly?
Thanks again, have a wonderful day!
If you look into 'Module' column in the memory access result you'll see that all "func@XXX" functions are from system modules. Note that hotspots analysis collects stacks and may re-attribute samples from system modules back to user code. You can read more about it here: https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/analyze-performance/manage-data-views/viewing-stacks/call-stack-mode.html
The memory access analysis doesn't collect stacks and therefore can't do such re-attribution. This can be one of the reasons the hotspots picture is different there. Another reason can be that hotspots is user-level only analysis while memory access captures kernel activity as well.
What version of Visual Studio you are using? And what are the problems exactly? Not resolved function names or something else?
Lalzary, Noy wrote:
I'm using visual studio enterprise 2019, version 16.4.2. And yes - the problem is unresolved function names.
/Zi and /DEBUG:FULL are recommended options for building Windows binaries. See more details in VTune help
And it is possible to configure the symbol server for system libraries: more details.