title: Profiling a dll plugin
body: <p>I want to profile a dll plugin in C++. I have access to the source (being the author/mantainer) and can modify them (if needed for instrumentation).
  What I don't have is the source/symbols/etc of the host program which is calling the dll. I only have the headers needed to build the plugin. 
  The dll is invoked upon action from the client.</p>
  
  <p>What is the best way to proceed for profiling the code? It is not realistic to "wrap" an executable around the dll and it would be not useful because since in the plugin I am calling some functions from the host AND i need to profile those paths, a wrapper would skew the performance.</p>
  
  <p><strong>EDIT after Kieren Johnston's comment:</strong> Ideally I would like to hook into the loaded dll just like the debugger is able to (attaching to the running host process and placing a breakpoint somewhere in the dll as needed). Is it possible? If not, I will need to ask another question to ask why :-)</p>
  
  <p>I am using the TFS edition of Visual Studio 2010.</p>
  
  <p>Bonus points for providing suggestions/answers for the same task under AIX (ah, the joys of multiple environments!).</p>