Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4994 Discussions

Can VTune be used to analyze a single DLL ?

tinawan
Beginner
968 Views

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
968 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.

0 Kudos
tinawan
Beginner
968 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

0 Kudos
Peter_W_Intel
Employee
968 Views
0 Kudos
Reply