Community
cancel
Showing results for 
Search instead for 
Did you mean: 
tinawan
Beginner
107 Views

Can VTune be used to analyze a single DLL ?

Hi, guys:

My application has encountered performance issue and I narrow it down within an certain DLL.

So, I just want to analyze the single DLL by VTune.

I do the test according according to the instructions at
http://cache-www.intel.com/cd/00/00/21/92/219276_c allgraph.pdf(I also attached the instructions at the bottom of this post).

Unfortunately, Once the DLL is instrumented, My application always fails when trying to load the instrumented DLL by LoadLibrary() with a "Invalid access to memory location" message. If I restore the DLL with the original one, everything is OK. In the test, My application is extremely simple, just calling LoadLibrary() to load the instrumented DLL. The DLL exports one function to print "hello world".

I did the test on windows XP with SP3, Windows server 2008(32bit) and the same thing happens.

I found the same problem at http://software.intel.com/en-us/forums/showthread.php?t=59358 but without solution.

Can anyone explain this ?

Best wishes.

==================================================================

Instrumenting a Single DLL
Instrumenting a single DLL is useful if you are writing
a DLL that acts as a plug-in for another application
(especially one that you dont have the source or debug
information for). Java, .NET, and COM proling are not
supported in this mode. To instrument a single DLL,
follow these steps:
1. Click New Activity from the Activity menu to
create a new activity.
2. Select the Call Graph Wizard.
3. Select Windows/Linux Proling.
4. Click Next.
5. Check No application to launch.
6. Uncheck Run Activity when done with
wizard.
7. Click Next.
8. Add the DLL(s) that you want to prole to the
Modules of Interest list.
9. Click Finish.
10. In the Copy Instrumented Modules dialog
box, the VTune analyzer will ask if you want
to manually copy the les or use a batch le
created by the VTune analyzer. Either option
is ne.
11. Click Run.
12. Run the application that uses the DLL(s).
13. After you nish collecting performance data,
click the Stop button.
14. The VTune analyzer will display the results.

0 Kudos
3 Replies
David_A_Intel1
Employee
107 Views

Are you adding the EXE to the list of "Modules of Interest" (See the "hint" in the dialog box)? If not, then the call graph collector is probably not loaded and your LoadLibrary is loading a DLL that expects the call graph infrastructure to be there.

Try adding the EXE to the Modules of Interest after the DLL.

tinawan
Beginner
107 Views

Thanks very much.

With EXE and DLL all instrumented, VTune works well.

But what should I do if I just want to analyze the DLL for some specific reason?

Such as the EXE is protected and can not be instrumented, Or I really do not care about the EXE.

Regards

Peter_W_Intel
Employee
107 Views

Reply