Locked How to exclude a specified .dll from being profiled?

  • Thursday, August 04, 2011 9:39 AM
     
     

    I use the VS 2010/2008's performance tools to do profiling of my desktop application.

    When I analize the profiling report  of "Modules" view I can see a lot of  .dll files.

    Such as MSVFW32.dll,MSVCR90.dll,USER32.dll...

    But I juse want to instruments my .exe file and I want to exclude this .dll from instrumentation.

    Is there any solutions? And I have read the "How to: Limit Instrumentation to Specific DLLs" article.

    Thanks a lot.

All Replies

  • Tuesday, August 09, 2011 3:17 AM
    Moderator
     
     
    We can configure which assembly we want to profiling, but VS Profiler will automatically profiling dependency dlls, e.g kernel32, ntdll. Since the Modules window is grouped by module name, so you can just ignore other dlls.
    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Tuesday, August 09, 2011 6:39 AM
     
     

    But if I do not exclude these modules, the functions of these modules will efect the result of profiling.

    For example. _GetMessageW@16 (USER32.dll) always takes the frist place on  the Functions With Most Individual Work of Summaty view.

    And also the _memcpy(MSVCR90.dll).

    These functions take too much places on hot path, Functions With Most Individual Work and Function 

    So I just can't get the report that I exactly want.

  • Friday, August 12, 2011 3:08 AM
    Moderator
     
     

    Thank you for your question, we're doing research on this case, it might take some time before we get back to you.


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Wednesday, August 17, 2011 1:14 PM
     
     Answered

    Hi Vanessa,

    How about try the settings for performance tools.

    Tools-->Options-->Performance Tools-->General

    check "enable Just my code for profiler reports" and uncheck "show one-level of non user caller/callee function".

    Reference http://blogs.msdn.com/b/profiler/archive/2011/05/13/vs2010-just-my-code.aspx

    Tracy YU[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked As Answer by eryangModerator Friday, September 09, 2011 3:22 AM
    •  
  • Friday, November 18, 2011 5:33 PM
     
     

    Any update on this research. Having a feature to ignore the calls to system level dlls is very important. As without that when we do profiling in load-test environment or in production, even 10 mins snapshot results into vsp file size of few GBs. It takes mins to open it in VS and difficult to analyze the results due data related to system dlls.

    why to provide this feature for sampling only, it makes sense to have it for instrumentation as well.

    desparately waiting for this feature or some work around.

    Thanks

    -nilesh