Team System Developer Center > Visual Studio Team System Forums > Visual Studio Performance Tools (Profiler) > How to get: line-by-line information in the code profiler in VS2010 Ultimate
Ask a questionAsk a question
 

AnswerHow to get: line-by-line information in the code profiler in VS2010 Ultimate

  • Friday, October 23, 2009 1:08 PMDoc Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    In Chris's blog at http://blogs.msdn.com/chrissc/default.aspx, in his article entitled

    Visual Studio 2010 Beta 2 Available Now! , his figure 2 shows code profiler output that gives line-by-line information such as the percentage of time spent executing a particular line.  It also appears color-coded to show lines with the heaviest execution percentage.  In my version of Beta 2, I can get the lines to show in Function Details view, but there is no information about their execution profile and no color coding.  Though I have searched (with Bing!, of course) for information about this feature and how to turn it on, whether it is available for native C++ code as well as for C# code, and so forth, I cannot find anything helpful.  I would appreciate a pointer to documentation, a tutorial, or something else that would help get me started using this tool.

    • Moved byCharles SterlingMSFTMonday, October 26, 2009 12:18 AMProfiler Q (From:Visual Studio Team System 2010 Beta2)
    •  

Answers

  • Monday, October 26, 2009 6:24 AMChris SchmichMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Doc,

    This feature is only available if you use the profiler's sampling mode.  We do not give line-by-line execution statistics when using the instrumentation mode, so please be sure that you're doing sampling.

    If you're doing sampling and you're still not seeing anything, please let me know.

    Regards,
    Chris

All Replies

  • Monday, October 26, 2009 6:24 AMChris SchmichMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Doc,

    This feature is only available if you use the profiler's sampling mode.  We do not give line-by-line execution statistics when using the instrumentation mode, so please be sure that you're doing sampling.

    If you're doing sampling and you're still not seeing anything, please let me know.

    Regards,
    Chris
  • Monday, October 26, 2009 6:32 AMChris SchmichMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Also, I should mention that this works with both managed and native code, 32- or 64-bit.  If you want to know more about this feature, you can search on MSDN for "line level sampling".

    Regards,
    Chris