Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

Collecting VTune Hotspot with stack info on remote system

dcrumb
Beginner
717 Views

I am having problems collecting VTune Hotspot with stack info on remote system (a non-licensed system). I am using the following command and VTune is not creating the needed .tb5 or .tb6 file for importing into the VTune project (where I do have a license):

"c:\\Program Files\\Intel\\bin32"\\amplxe-cl -collect hotspots -knob accurate-cpu-time-detection=true -no-follow-child -target-duration-type=medium -no-allow-multiple-runs -analyze-system -data-limit=100 -slow-frames-threshold=40 -fast-frames-threshold=100 --search-dir sym:p=\\\\rfsbuild\\rfsbuilds\\auto\\rfs-4.0.65\\3203\\release\\x86 --search-dir sym:p=\\\\rfsbuild\\rfsbuilds\\auto\\rfs-4.0.65\\3203\\release\\x86\\2003 --duration 800 --target-process rfs.exe

When I run that command, I get the following warning:

Warning: Accurate CPU time detection was disabled. Not enough storage is available to process this command. Please see the Troubleshooting section of the product documentation for details.

I have tried opening the results file directly but they do not show enough detail as they are missing the function names of my application and I do not know how to get VTune to read the symbols so that i can get the function names. What am I doing wrong?

0 Kudos
8 Replies
Mark_D_Intel
Employee
717 Views
Are the symbol directories (pointed to by the -search-dir command line option) visible on the target machine?

If the symbols are also visible (or only visible) from the host machine, try resolving symbols again on the host. In the GUI, use the "Re-resolve" button on the right-hand side, when in the "Analysis Type" tab. Make sure the symbol directories are set in the Project Properties (it appears you set them up already in the project - open the result into the same project, and it should work fine).

Or from the command line on the host machine, run 'amplxe-cl -finalize -r -search-dir '

As small aside, the 'hotspots' collection type is a user-mode sampling collection type and does not produce *.tb5/6 files (these are produced by the hardware-based collection types). Copying the result directory from a remote machine should work fine in either case.

The warning you see should not be a big problem (at least it should not interfere with symbol resolution). It will only affect the accuracy of the collected CPU time data. Either enable the accurate CPU Time collection by running as Administrator, or change the command line to '-knob accurate-cpu-time-detection=false' to remove the warning.
0 Kudos
dcrumb
Beginner
717 Views
Thanks for the informaiton.
Yes, the symbols are visable on the target machine but that does not seem to help. Is there something else I might need to do to ensure the target is properly reading and processing the symbol files?

I have tried to do the "Re-Resove" but that does not change anything. I think this is because when I try to view the results on the host machine, I cannot change the "Project Properties" so that "Re-Resolving" the results does not know where to get the needed sysmbols to show the desired information. It looks like the "Project Properties" button just above the "Re-resolve" button is greyed out and I cannot find any other place to change the settings.
Is there a way I can import the results into a project so that the re-resolving of the files will have access to the project configuration? As far as I can tell, the only way to import results into a proect is via a *.tb5/6 file but as you ust indicated, that file is not being created for user-mode sampling (I did not know this before).


0 Kudos
Mark_D_Intel
Employee
717 Views
To get the result into the project:

In the GUI, open the project. Open the project properties and see where the project directory is located ('Store result in the project directory'). Copy the result directory to the project directory.

Then select 'File->Open->Result'. Then choose the result marker file (result directory has a name like 'r000hs'. The marker file is inside and has a name like 'r000hs.amplxe'. It should have the Amplifer icon next to it as well). Now the project properties should be available (and Re-resolve should use the search directories from it).



0 Kudos
dcrumb
Beginner
717 Views
Ok, I tried that and I still do not get any function names. Also, after I have opened the project, I have the option of changing the project properties. But once I open the results, I am no longer able to set or change project properties. Finally, when I right click on the Project in the "Project Navigator", it indicates the project is close and needs to be re-opened (and doing so closes the results I am trying to view).
Why is the currently opened project getting closed when I open the results? Why can I not Import the User Mode results ("File"->"Import Result...") into the project? Or, given that importing is not an option, how do I set the "Source Files", "Binary Files", and "Symbol Files" search directories for a result that will be used when I "Re-resolve" the results (as the project seems to be getting closed when I open the results)?
0 Kudos
Mark_D_Intel
Employee
717 Views
I don't know why this isn't working ... make sure you open the result copied into the project's directory so the GUI thinks it's part of the project (and thereby doesn't close it when opening a new project)?

Also, you could try re-resolving from the command line before loading into the GUI.

Are the symbol files in the directories given, or are they in subdirectories? If they're in subdirectories, there is a GUI option to make it check subdirectories when setting them up (check box at the end of the line with the search path). Or on the command line add 'r' after 'sym:', like -search-dir sym:pr=

In case none of this works, what compiler are you using, and what options are used to generate the symbol files (like /Zi?).
0 Kudos
dcrumb
Beginner
717 Views
Ok, I figured out what I had to get it to work. Part of it was exiting and restarting VTune after I copy the results to the project directory and not the "Store resaults in" localtion (which is not the project directory). When I did that, the results were already imported into the proect when I opened the project. No need to then open the results.
Thanks for your help.
0 Kudos
David_Cherkus
Beginner
717 Views
Hi, I would like to put in a few follow-ons to this thread since it's similar to my use case. > Are the symbol directories (pointed to by the -search-dir command line option) visible on the target machine? In the case of the remote system, we typically do not want to have the symbols visible on the remote system, since they take up a lot of room. Is that a requirement? Given our lack of memory, we run the CLI with "-target-duration-type=short --no-summary --no-auto-finalize" to reduce vtune's runtime memory demands. > As small aside, the 'hotspots' collection type is a user-mode sampling collection type and does not produce *.tb5/6 files (these are produced by the hardware-based collection types). Interesting. Is there something to check for to see that the collection is done correctly? Right now we check for the presence of the tb6 file to confirm samples have been gathered during the general analysis mode. > Copying the result directory from a remote machine should work fine in either case. We have found that copying the results directory does not work for us. What we've found does work is copying the directory over then importing the results to a project we create ahead of time. This project has the right directories set to finalize the data and find the symbols and source, whereas we do not provide this information when we run the CLI on the remote machine. Thanks, Dave
0 Kudos
Mark_D_Intel
Employee
717 Views
Hi Dave, You do not need symbols visible on the target machine since you are not performing symbol resolution (-no-auto-finalize) on the target. To check that the hotspots collection was run correctly, you could look in the <result dir>/data.0 directory and ensure that at least one of the files is of reasonable size (probably greater than 4K or so - check this by doing a very short run to see what a minimal size is). The flow you are using - copy the result directory to an existing project to get the search directories - should work fine. Another way to do this 1. Copy result directory to host machine 2. Finalize results from command line with 'amplxe-cl -finalize -r <result dir> -search-dir all=<paths to symbol/source files>'. (Use 'amplxe-cl -help finalize' to see the exact format for the -search-dir option) 3. Load the result into the GUI (The GUI can be launched from the command line: 'amplxe-gui <result dir>')
0 Kudos
Reply