Profiling dll plugin

I want to profile the dll plugin in C ++. I have access to the source (I am the author / author) and can modify them (if necessary for the toolkit). What I don't have is the source / symbols / etc of the host program that calls the DLL. I have only the headers needed to create the plugin. DLL is called upon client action.

What is the best way to profile your code? Wrapping the executable file around the dll incorrectly, and it would be useless, because since I call some functions from the host in the plugin, I need to profile these paths, the wrapper would distort performance.

EDIT after a comment by Kieren Johnston: Ideally, I would like to connect to the loaded dll just like a debugger (bind to the host with the host and place a breakpoint somewhere in the dll as needed). Is it possible? If not, I need to ask another question to ask why :-)

I am using the TFS version for Visual Studio 2010.

Bonus points for providing suggestions / answers for the same task on AIX (oh, the joys of several environments!).

+5
source share
2 answers

This is possible, although a little annoying.

  • Deploy your pluggable dll to where it needs the application
  • - ,
  • EXE 3
  • .

, VS .

+3

VS10, dll, exe .

: 1) , " ", 2) , , .

(2) , ? , - .

(1). , , " " - . , , , , - , . , , . , , , -.

, 48 20, 17, 13, 10, 7, 4, 2.1 , 1.1, 8 . ** 40 . , , - , , , . , . . ( . , , , .)

** , , 2,38, 1,18, 1,31, 1,30, 1,43, 1,75, 1,90, 1,91. : 58%, 15%, 24%, 23%, 30%, 43%, 48%, 48%. , , . (, .)

+1

All Articles