Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Brian_S_4
Beginner
153 Views

Unable to see function names in analysis windows

First some background information:

VTune version: Intel(R) VTune(TM) Amplifier XE 2016 (build 444464)

host and target systems:  Linux 3.16.0-41-generic #57~14.04.1-Ubuntu SMP Thu Jun 18 18:01:13 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

----

I'm running a process on my target system called /usr/bin/ccc_mgr.  It's running as a service, and I've compiled and built it using the -g -O3 options using this command:

/usr/bin/c++   -std=c++11 -Wall -Wextra -Wno-unused-parameter -fPIE -g -O3 -mtune=core-avx2 -march=corei7-avx

The application uses man, many c++ std::threads if that matters.

  I collect data on it using this command:

    amplxe-cl --target-install-dir=/opt/intel/vtune_amplifier_xe_2016.2.0.444464 -collect advanced-hotspots --target-pid <insert_pid_here>

Then I import the resulting data into the VTune GUI and look at the top down analysis, and instead of seeing my source code names for functions I instead get names like this:

    func@0x4f0c99

 

The collection log window gives complaints about not being about to find symbols for things like libpthread, but no warnings for my application.

---

As a test I compiled the tachyon example c++ on my target machine and followed the same process that I used for my application.  I'm able to see all source code symbols in the tachyon example, so it's definitely an issue with my application, but I can't figure out what I'm missing.

 

Any thoughts or suggestions ?

-Brian 

 

0 Kudos
7 Replies
David_A_Intel1
Employee
153 Views

Hi Brian:

Verify symbols were not stripped with the command 'file <executable>'.

First, what are you trying to accomplish?  You are specifying the target-install-dir option, but that is only required for remote data collection and you haven't specified a remote target.

Then, since you aren't doing a remote collection, you don't need to "import" the results.  You can just open the results in the GUI.  Importing into a project is only necessary when you want to re-resolve the symbolic references, that shouldn't be required in this case.

Something that helps to verify your set up and clarify that there is something unique about your build is to build one of the samples included in the installation, e.g., matrix or tachyon in the C++ samples, and profile that.  If everything works, then you know that there is just something specific to your application build that is limiting your view of the symbols.

Brian_S_4
Beginner
153 Views

OK I think that I have it figured out.  My executable seems to be OK.  The problem seems to be coming from the fact that I was collecting data on the remote system, then doing a Project Import Results.  When I collect the data remotely, copy the resulting r000ah directory locally, then open the r00ah.amplxe file I get the symbols correctly.  I also found that I need to copy the results locally before opening them - otherwise it doesn't work properly.  

 

On a related item, what would make the collection hang when hitting Ctrl-C to stop it ?  That happens periodically to me ...

 

-Brian

 

 

Brian_S_4
Beginner
153 Views

here's a little more information on the hang ups I see.  I have two processes that I'm monitoring.  One is the ccc_mgr process I mentioned, and another is called rhfsd.  The ccc_mgr process runs as root, and rhfsd runs as ryftone.  When I collect data on rhfsd I collect as root since ryftone is not an account that can be logged in to and only exists for this process to execute under.  As long as I collect advanced-hotspot data everything works correctly.  If I try to collect hotspot or locksandwaits data I'm told that I can't collect data because the credentials of the collection and target process don't match.  If I collect as ryftone, collection begins but I can't terminate it with a Ctrl-C.

Is there a recommended approach to this situation ?  I can't easily change the users that my processes are running under, so I'm pretty much stuck with ccc_mgr running as root and rhfsd running as ryftone.  Can I not collect as root for all processes ?  Or is there a way that I override the credential check to allow this to work ?

 

-Brian

David_A_Intel1
Employee
153 Views

If you are doing a remote collection, you can use the remote support in amplxe-cl to collection results and have them automatically copied to the local host.  See this documentation.

Regarding Ctrl-C, if it is causing a problem, try using the "stop" command, e.g., amplxe-cl -r <results-dir> -command stop.

Brian_S_4
Beginner
153 Views

I can get remote collection to work, but my real issue is the mismatch of credentials.  One of the processed that I want to collect data on runs as 'root'.  For security reasons I can't password-less SSH into the system as 'root'.  The other process runs as 'ryftone' which also can't be SSH'd.  I could make that account available via SSH if I had to, but that doesn't solve the problem since I still have a process running as 'root'.

So, if there's no way around that then I'll have to collect data on the remote host (so that I can by the user with matching credentials) and view the data locally.

 

David_A_Intel1
Employee
153 Views

The credential check is not something VTune Amplifier is imposing by, rather, Linux.  So, best thing is for you to collect as root on the remote system and copy the results.

Brian_S_4
Beginner
153 Views

Unfortunately that doesn't work for me.  You can see from the output below that even as 'root' I can't collect data due to credential issues.  What are the credentials in question ?  I would think that as 'root' I could collect data on any process that I want to.  The only way that I can get the collection to work is to run it as 'ryftone' - the same user that's running the process - but then I can't stop it either with Ctrl-C or the stop command.  I'm convinced that it has something to do with the 'ryftone' account setup, but I need a few hints from you on what to look into.

root@maverick:/tmp# /opt/intel/vtune_amplifier_xe_2016.2.0.444464/bin64/amplxe-cl –collect hotspots --target-pid 1503
amplxe: Collection started. To stop the collection, either press CTRL-C or enter from another console window: amplxe-cl -r /tmp/r000hs -command stop.
amplxe: Error: Data collection is interrupted because credentials of the target process and VTune Amplifier do not match. Please start both target process and VTune Amplifier with the credentials of the same user and try collecting data again.
amplxe: Collection failed.
amplxe: Internal Error