Profiling with VTune

From Apache OpenOffice Wiki
Revision as of 17:07, 18 February 2009 by Mt (Talk | contribs)

Jump to: navigation, search

Introduction

VTune is a utility for profiling applications, available for all Windows platforms and for Linux. If you don't have a licensed version yet, you may download an evaluation version from www.intel.com.


Preparations

Install the lasted version of OpenOffice.org. Product builds are preferred because they might use more compiler optimizations, and non product builds have a lot of overhead starting with simple assertions and ending in expensive integrity checks in some modules.

Depending on how deeply you want to analyze certain OOo modules, you might need the debug information, contained in the PDB files.

In opposite to debuggers, it seems that VTune doesn't find PDB files on their original location or via the NT_SYMBOL_PATH, so you must copy them next to the DLL. Make sure to copy the DLL and PDB file to the correct directory (program, Basis\program or URE\bin).

 Hint for engineers at Sun Hamburg: 
 All PDB files are located on a network share, so you can copy them easily by calling 
   for %xy in (*.dll) copy o:\%WORK_STAMP%\wntmsci12.pro\pdb.%UPDMINOR%\%@NAME[%xy].pdb
 in the different program directories (4NT shell required).

For profiling, what you really want to profile is soffice.bin, not the loader soffice.exe. But VTune doesn't allow you to choose soffice.bin for profiling, so you need to delete soffice.exe and rename soffice.exe to soffice.bin.

If you want to make a call graph analysis, you also need to link soffice.bin a little bit differently: In the desktop module, delete wntmsci12.pro\bin\soffice.exe, set environment variable LINK=/fixed:no and rebuild the module. The resulting soffice.exe is what you normally find as soffice.bin in the installation set, while officeloader.exe is what you normally find there as soffice.exe.


Working with VTune

Personal tools