Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrzej_S_
New Contributor I
185 Views

How to set up source files for Intel Inspector 2011 Result file?

Hi,

i have a problems with Result file of Intel Inspector 2011 Detect Leaks job. The job was ran on one of my testing machines, but I would like to investigate this file locally. The problems comes to the source files - as it was ran on another machine, I don't have an access to these source files at my machine, and when I open results in Intel Inspector XE2011 and try to enter particular memory issue, I can see an erro like this:

IntelInspectorNoSourceFile_0.PNG

Do you now how I can set up the path to target source files?

Keep well,

Andrzej

0 Kudos
9 Replies
Peter_W_Intel
Employee
185 Views

I think that you have to copy source file to another machine, since option "-finalize" only re-resolves symbol relocation in your result in local machine, not for source. For example:  > inspxe-cl -finalize --search-dir all:rp=Dir1 -r r000mi3 ; local machine

You need to do like: >inspxe-cl -collect mi3 --search-dir all:rp=Dir1 -- application ; Dir1 stores your source in another machine. It means that Inspector collects data and combines source info in another machine. Result can be displayed on local machine even source file or path is missed in local, piece of source is stored in result as "cache" mode.

You can do similar thing on GUI, add source path in Project Properties, then run inspector.

P.S> 2011 version is too old. Recommend to use latest 2015 U1.

Andrzej_S_
New Contributor I
185 Views

Hi Peter,

thank you for your response.

I understand it is impossible to point the source files directory for result file inspection, however I have two additional questions:

1. On my testing machine, there was a source code directory structure starting at location c:\temp\machineName\main\..., e.g.L: c:\temp\machineName\main\src\projecName\File.txt. On my local machine I have source code directory structure starting at location c:\code\myName\main\. So I thought I will prepare a hard link junction to my directory structure, from this c:\temp\... etc. using this tips: http://superuser.com/questions/234422/does-windows7-support-symbolic-links-folder-shortcuts . However it does not work - do you know why?

2. Regarding Intel Inspector 2015.. yeah, I know we should migrate to it, but will it be able to point the source directory structure from this version of Intel Inspector?

Keep well,

Andrzej

Peter_W_Intel
Employee
185 Views

Hi Andrzej,

Let me clarify more scenarios about source view:

!!! Recommend to use option "-search-dir" during data collection.

case 1: Copy result and binary/src to local machine ("/home/peter"), but location is different from target machine, I collected at "/home/peter/problem_report" - Cannot show source because, source's absolute path is mismatched.

case 2: Makedir /home/peter/problem_report in local, them copy all files in this fold, inspector can display source.

case 3. In this local machine, remove source file to another fold, that is OK. inspector still can display source (cached when data collecting)

Andrzej_S_
New Contributor I
185 Views

Hi Peter,

I worked with your way and it doesn't work, despite that fact, that when I right-click onto the message that says "Source file not found", choose "Copy Source File to Clipboard" and paste it into explorer, than it is being opened by the associated file editor. Do you know why it is like that?

Additionally, do you have any clues about not working hard links?

Keep well,

Andrzej

Peter_W_Intel
Employee
185 Views

What a pity. Ways I provided yesterday are only for Linux*, I have no way to do similar things on Windows*...

Andrzej_S_
New Contributor I
185 Views

Ok, thank you for your help!

Peter_W_Intel
Employee
185 Views

I needs to escalated this problem to development team.

Another concern is that Inspector cannot do "finalize" for source "caching" on Windows, that is only for symbol relocation - update inspector's result. This is painful - the user should collect data and display problematical source in same machine (This is only a problem on Windows*, Linux* version is OK - see my post 08/13/2015 - 11:55 )  

Peter_W_Intel
Employee
185 Views

Collect / analyze data from Windows* to Windows* -

The temp workaround is to use "export" and use "import" in another machine, like this:

>inspxe-cl.exe -export -archive-name="my_result" -include-sources -r r000mi3

Open GUI in another machine to import result named my_result.inspxez .

 

Peter_W_Intel
Employee
185 Views

Now 2016 version has fixed this problem.

I used like “amplxe-cl –c mi3 –search-dir all:rp=. – mleak.exe”, then copy exe/pdb/src with result to other machine where Inspector 2016 has been installed.

It works!

>inspxe-cl -R problem -verbose -r r002mi3

P1: Error: Memory leak: Not fixed

P1.3: Error: Memory leak: 80 Bytes: Not fixed

  C:\Users\peter\mleak.c(5): Error X3: Allocation site: Function main: Module C:

\Users\peter\mleak.exe

  Code snippet:

   3  {

   4  int *a;

  >5  a= (int *)malloc(sizeof(int)*20);

   6  }

  Stack (1 of 1 instance(s))

  >mleak.exe!main - C:\Users\peter\mleak.c:5

   mleak.exe!_tmainCRTStartup - f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crt0.c:240

   kernel32.dll!BaseThreadInitThunk - C:\Windows\system32\kernel32.dll:0x0000000000015A4B

   ntdll.dll!RtlUserThreadStart - C:\Windows\SYSTEM32\ntdll.dll:0x000000000002B82F

Reply