=============================================================================== VTune(TM) Performance Analyzer Sampling Collector for Mobile Internet Device (MID) and Embedded Linux* platforms Installation Guide v.1.5 =============================================================================== Installing the VTune analyzer sampling collector =============================================================================== 1) Log into the target Mobile Internet Device (MID) or embedded Linux system as root. NOTE: Embedded Linux users must first prep their target Linux system with the following bits from the host Linux machine: a) copy "bash", "tr", "pgrep", and "pkill" utilities from host machine and install them in /bin on target machine b) copy any libraries required by a) from the host machine and install them in /lib on target machine c) [optional] start up "klogd" service on target machine; this can be used for viewing kernel output sent to /var/log/messages 2) Copy the VTune(TM) Performance Analyzer for MID package to the Linux* system and unpack: $ gunzip vtuneNNNN_target.tar.gz $ tar -xf vtuneNNN_target.tar $ cd vtuneNNN_target/ 3) Run the install-vtune-sep.sh script to install the software. NOTE: Embedded Linux users will need to manually cross-compile the sampling driver on the host machine, and then copy it to the pre-built driver directory on the target machine. # first, log into target machine and verify that the running kernel # is compiled with profiling enabled grep profile_event_register /proc/kallsyms grep profile_event_unregister /proc/kallsyms grep register_module_notifier /proc/kallsyms grep unregister_module_notifier /proc/kallsyms # if these functions are not available in the running kernel, # then kernel MUST be recompiled with the following options: cd /path/to/configured/kernel/sources/linux-2.6.xy vi .config # add "CONFIG_PROFILING=y" # once the kernel is properly configured/built for profiling and # module support "CONFIG_MODULES=y", "CONFIG_MODULE_UNLOAD=y" # then prepare the host system for building the driver export TARGET_KERNEL=/path/to/configured/kernel/sources/linux-2.6.xy mkdir -p /lib/modules/2.6.xy cd /lib/modules/2.6.xy ln -s $TARGET_KERNEL build # build the sampling driver on host machine cd /path/to/vdk/src ./build-driver -ni --kernel-src-dir=$TARGET_KERNEL \ --kernel-version=2.6.xy # copy driver to the pre-built driver directory on target machine # (e.g., /path/to/vdk) =============================================================================== Collecting data on target Linux system using the VTune analyzer =============================================================================== 1) Ensure that the sampling driver is loaded in the kernel and the current user can access the driver: $ cd /path/to/vdk $ grep ^DRIVER_GROUP insmod-vtune # make sure DRIVER_GROUP is set to a # local group (for example, "users") # and the current user is a member # of that group $ ./insmod-vtune # load the driver 2) To perform sampling, use the sampling collector tool: $ cd /tmp $ sep -start -d 20 -out my_data NOTE: The sampling collector relies on "cpu MHz" entry being available in /proc/cpuinfo for collections which use the clockticks and instructions retired events. On some embedded Linux systems, this entry may be missing, resulting in the collector reporting "0 samples collected, no tb5 created". If this happens, the sample after values (SAV) for those events will need to be explicitly specified. For example, to collect 1000 samples per second on a 1GHz system, use an SAV = 1GHz / 1000 = 1,000,000 sep -start -d 20 \ -ec "CPU_CLK_UNHALTED.CORE":sa=1000000,"INST_RETIRED.ANY":sa=1000000 \ -out my_data For general information on sampling collector options, run: $ sep -help For additional information, please see the User's Guide installed under the vtune/doc/ directory. =============================================================================== Viewing data collected on the Mobile Internet Device (MID) Linux* system =============================================================================== To view sampling data collected on a MID Linux system, do the following: 1) If not already done, install the VTune analyzer 9.1 Update UU package (vtune_linux_9.1.updUU.NNNN.tar.gz) on another, non-MID Linux system. See Release_Notes.htm in the above package for the list of supported non-MID Linux platforms. 2) Copy the .tb5 file to the non-MID Linux system. 3) Import the tb5 file to the VTune analyzer using the viewers in vtl or Eclipse*-based vtlec. a) To view the tb5 file with vtl, use the following commands: vtl import my_data.tb5 # imports the tb5 file into new activity vtl show # shows list of imported activities vtl view -ar f1 -processes # process view in text mode for activity f1 vtl view -ar f1 -gui # shows results in GUI mode for activity f1 man vtl # help/manual page for vtl b) To view the tb5 file with vtlec, do the following: In vtlec, go to File->Open File... and specify the tb5 file to import. This creates a new project icon in the left panel of the Eclipse* workspace. Double-click the imported sampling results icon to view the tb5 data. Note: Drilling down to hotspots by function and sources may require copying additional files from the MID Linux system to the non-MID Linux system where VTune analyzer is installed. =============================================================================== Help and Support =============================================================================== * For instructions on building, loading, and installing the sampling driver on your Linux system, see vdk/README file. * To report problems using this tool, please contact VTune analyzer support (https://premier.intel.com/). =============================================================================== Disclaimer and Legal Information =============================================================================== INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL(R) PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information. The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or by visiting Intel's Web Site. Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. See http://www.intel.com/products/processor_number for details. BunnyPeople, Celeron, Celeron Inside, Centrino, Centrino logo, Core Inside, FlashFile, i960, InstantIP, Intel, Intel logo, Intel386, Intel486, Intel740, IntelDX2, IntelDX4, IntelSX2, Intel Core, Intel Inside, Intel Inside logo, Intel. Leap ahead., Intel. Leap ahead. logo, Intel NetBurst, Intel NetMerge, Intel NetStructure, Intel SingleDriver, Intel SpeedStep, Intel StrataFlash, Intel Viiv, Intel vPro, Intel XScale, IPLink, Itanium, Itanium Inside, MCS, MMX, Oplus, OverDrive, PDCharm, Pentium, Pentium Inside, skoool, Sound Mark, The Journey Inside, VTune, Xeon, and Xeon Inside are trademarks of Intel Corporation in the U.S. and other countries. * Other names and brands may be claimed as the property of others. Copyright (c) 2006-2009, Intel Corporation. All rights reserved.