Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How could I get rid of "PRF0002: Instrumentation failed with these options" error with Microsoft Visual Studio 2010 Performance Profiler?

I am now using Microsoft Visual Studio 2010 Performance Profiler to profile one program. It works very well when I use CPU sampling method. However, when I use Instrumentation method, I get the following error message:

PRF0002: Instrumentation failed with these options: /u "my program" /excludesmallfuns. Please check the output window for additional details.

I was wondering how I could get rid of this error. Thanks!

like image 610
feelfree Avatar asked Dec 10 '12 17:12

feelfree


1 Answers

  1. Turn on profiling for executable and .dll's you're about to profile (See this Microsoft documentation on /PROFILE linker option )

  2. From Performance profiler > Settings > Additional Instrumentation options - add multiple /include:<function name> or /include:<class name>::<function name>, where function name can be replaced with * asterisk. For some reason pressing 'Ok' did not work for me - needed to press 'Apply' first, only then settings would be taking into use. (Using Visual studio 2019, 16.4.3) Using /verbose can be used to troubleshoot instrumentation problems. Full list of options can be found here: Microsoft documentation on VSInstr.

like image 117
TarmoPikaro Avatar answered Nov 02 '22 00:11

TarmoPikaro