Team System Developer Center > Visual Studio Team System Forums > Visual Studio Performance Tools (Profiler) > VSP2005 and VSP1011 errors when instrumenting unmanaged code containing third party libraries without .pdb symbols available
Ask a questionAsk a question
 

AnswerVSP2005 and VSP1011 errors when instrumenting unmanaged code containing third party libraries without .pdb symbols available

  • Wednesday, September 30, 2009 10:09 AMVijay Ach Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Warning VSP2005 : Internal Instrumentation Error: The object '\vijay.acharya_vie
    w\pdms102\flex\Debug\cadcflex.lib(wsock32.obj)' was built without debug information and lots of these are generated for each object in within the library.
    Error VSP1011 : Unable to obtain debug information. Link with the /Profile linker switch.

    I tried the command line options "Exclude" but was not sucessful in instrumenting.  Is there a command to exclude a third party library completely within VS2008?
    I have looked at other blogs and found that there is an option within VS2005, /d-ignrcverr to ignore coverage of a libray.

    Any advice is appreciated

    thanks
    Vijay

    • Moved byKevin BlaskoMSFTThursday, October 01, 2009 5:39 PMQuestion is about instrumenting for the Profiler (From:Visual Studio Code Analysis and Code Metrics)
    •  

Answers

  • Monday, October 12, 2009 9:36 PMChris SchmichMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Vijay,

    The "Warning VSP2005" message is just a warning and can be safely ignored.  The second message is definitely an error, however.  Does this binary (pdms.dll) contain any hand-written assembly?  Do you link in any specific software licensing libraries?  Are you using any obfuscation tools on this binary?  We've had issues in the past instrumenting binaries like that.

    You can try using the VS2010 profiler as it might have better support for your binary.  Otherwise, we'll have to narrow down on the problematic code that is causing instrumentation to fail.

    Regards,
    Chris

All Replies

  • Thursday, October 01, 2009 9:16 PMChris SchmichMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Vijay,

    You can safely ignore the "Warning VSP2005" messages.  The "Error VSP1011" message means that you need to specify "/link /Profile" when linking your binary.  You can enable this linker option by doing the following:

    1. In "Solution Explorer", right-click on your project node, select "Properties"
    2. Go to "Configuration Properties" -> "Linker" -> "Advanced"
    3. In the property grid, set "Profile" to "Yes (/PROFILE)"
    4. Recompile your application
    5. Try profiling again

    You do not need to specify the /exclude flag or any extra command-line options.

    Regards,
    Chris
  • Monday, October 05, 2009 2:29 PMVijay Ach Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     Chris,Thanks for the reply.

    I did eventually manage to come around the problem of linking error by udpating a Clearcase build file which is our build and repository engine. 

    However i am now seeing a new error messages:

    Message 1 (This error is being displayed from the beginning)
    Warning VSP2005 : Internal Instrumentation Error: The object '\vijay.acharya_vie
    w\pdms102\flex\Debug\cadcflex.lib(wsock32.obj)' was built without debug informat
    ion.

    Message 2:  This is the new one after enabling the linking property
    Error VSP1033 : The file 'M:\vijay.acharya_view\PDMS\Build\Debug\pdms.dll' does
    not contain a recognized executable image. 
     
    Regarding the Message 1, The dll that i am trying to instrument refers to a statically linked .lib file, which is third party C++ library.  I did try all combinations of Exclude option  to exclude the .lib file from being instrumented but still was not unable to get around that. The problem I have with the .lib file is , its is a set C++ library functions and does have a namespace or class definition ,which can be mentioned in the Exclude command line option. Is there any option that you could think that i can try ?  

    Regarding the  Message 2, I am using VS 2008 profiler version and the product is built in VS 2008 as well. Should I try with VS2010 profiler instead ?

    Thanks
    Vijay
  • Monday, October 12, 2009 9:36 PMChris SchmichMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Vijay,

    The "Warning VSP2005" message is just a warning and can be safely ignored.  The second message is definitely an error, however.  Does this binary (pdms.dll) contain any hand-written assembly?  Do you link in any specific software licensing libraries?  Are you using any obfuscation tools on this binary?  We've had issues in the past instrumenting binaries like that.

    You can try using the VS2010 profiler as it might have better support for your binary.  Otherwise, we'll have to narrow down on the problematic code that is causing instrumentation to fail.

    Regards,
    Chris