How to Use Power Collection in Intel® VTune™ Amplifier for Systems


Intel® System Studio is the name for the Intel’s new embedded software tool suite. This tool suite includes Intel® VTune Amplifier for Systems. This article will explain the steps you need to follow to run the new remote power collectors in VTune Amplifier for Systems on an embedded platform. 


Note: we currently don't support power analysis for Intel® Atom™ processors for Yocto Project*. To use the power analysis feature the current restrictions are:

  • Intel® Xeon® processors or Intel®  Core™ processors based on Intel® microarchitecture code named Nehalem or above
  • Linux kernel version 2.6.32 or above

The embedded OS we will be focused on is Yocto Project* version 1.2.This platform supports many Intel BSP’s and it also allows you to work without running any physical embedded hardware by letting you develop via an emulator that they provide.  Here are the steps we will take to run our collection:

  1. Setting up a Yocto 1.2 environment.
    1. Setting up your Linux host
    2. Setting up a cross compilation environment
    3. Setup a full build of Yocto for your BSP
    4. Building a Yocto kernel
  2. Install System Studio
    1. Cross build the power driver.
    2. Load driver onto your device.
  3. Setup target to not require password.  (necessary for the remote collection script)
  4. Run a remote collection using
  5. On your Linux host view the results in the Intel® VTune™ Amplifier for Systems GUI

Note: steps  1,2 and 3 are one time steps. Once you have the power driver built and loaded on your system you should be enabled to collect power data.

Setting up a Yocto Projct* 1.2 environment

  1. Download the pre-built toolchain, which includes the runqemu script and support files
    download from:
    1. The following tool chain tarball is for a 32-bit development host system and a 32-bit target architecture: poky-eglibc-i686-i586-toolchain-gmae-1.2.tar.bz2
    2. You need to install this tar ball on your Linux host in the root “/” directory. This will create an installation area “/opt/poky/1.2”
  2. Setup your Linux host system
    1. For my Ubuntu x64 12.04 system I ran the following command to setup my system.
    2. See the Yocto getting started guide for more information on the setup required for various Linux distros:
  3. Build Yocto
  4. Download the Latest stable Yocto build system.
    1. tar xjf poky-denzil-7.0.1.tar.bz2
    2. source poky-denzil-7.0.1/oe-init-build-env poky-denzil-7.0.1-build
    3. Edit poky-denzil-7.0.1-build/vonf/local.conf
      1. Tailor MACHINE to the bsp you want to build.
    4. Edit poky-denzil-7.0.1-build/conf/bblayers.conf
      1. Specify the meta-intel you checkeout
    5.  Build Yocto
      1. butbake core-image-sato
      2. This will create a kernel that is sufficient to build sep and vtss

Install Intel® VTune™ Amplifier for Systems

  1. Install Intel® VTune™ Amplfier for Systems on your Linux host. .
  2. You will need to build the power driver and load it on your target in order to collect power data.
    1. cd $VTUNE_INSTALL/powerdk
    2. For example, if you are building a Yocto 1.2 build of the fri2-noemgd board support package then your build command would be similar to the following:
    3. source /opt/poky/1.2.1/environment-setup-i586-poky-linux
      ./build-driver –kernel-src-dir==~/yocto/poky-denzil-7.0/build/tmp/work/fri2_noemgd-poky-linux/linuxyocto3.2.11+git1+5b4c9dc78b5ae607173cc3ddab9bce1b5f78129b_1+76dc683eccc4680729a76b9d2fd425ba540a483-r1/linux-fri2-noemgd-standard-build  --kernel-version=3.2.18-yocto-standard
  3. Load the power driver on your target.
    1. scp $VTUNE_INSTALL/powerdk/src/apwr*.ko root@target_io:/home/root
    2. Login to your target
    3. insmod- apwr*.ko
    4. Verify the sep and vtsspp drivers loaded.
      1. lsmod | grep apwr
  4. Install the remote collection binaries on the target
    1. Copy the contents of $VTUNE_INSTALL/target/linux32 (or linux64 depending on your target).
      1. scp linux32 root@target_ip:/home/root
  5. Cross build the power driver
  6. Load the power driver on your target

Setup target to not require a password

  1. Make sure your root directory has a .ssh directory and only the owner had read/write/execute access on it.
  2. cat ~/.ssh/ | ssh root@ip_target “ cat >> /home/root/.ssh/authorized_keys”
  3. On the target chmod 600 /home/root/.ssh/authorized_keys
  4. Verify you can now login without password
    1. ssh root@target_ip

Run Intel® Vtune™ Amplifier for Systems remote collector on your application

  1. Set up some target environment variables
    1. export AMPLXE_TARGET_PRODUCT_DIR=/home/root/linux32
      1.  From the location you copied the remote collection binaries
    2. export AMPLXE_TARGET_TMP_DIR=/tmp
  2. Run collection
    1. –target=root@ip_target  -pwr-config=sleep,frequency –result-dir r@@@ -- /tmp/hello
    2.  This will run a remote power collection on your target and it will run your target application /tmp/hello. It will also create a result directory r000 that you can open on your host.

On your Linux host: View the Vtune™ Amplifier for Systems results

1.       amplxe-gui r000

For more complete information about compiler optimizations, see our Optimization Notice.