Intel® System Studio 2013 is the name for the Intel’s new embedded software tool suite. This tool suite includes Intel® VTune Amplifier 2013 for Systems. This article will explain the steps you need to follow to run the new remote power collectors in VTune Amplifier 2013 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:
- Setting up a Yocto 1.2 environment.
- Setting up your Linux host
- Setting up a cross compilation environment
- Setup a full build of Yocto for your BSP
- Building a Yocto kernel
- Install System Studio 2013
- Cross build the power driver.
- Load driver onto your device.
- Setup target to not require password. (necessary for the remote collection script)
- Run a remote collection using amplxe-runss.py
- On your Linux host view the results in the Intel® VTune™ Amplifier 2013 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
- Download the pre-built toolchain, which includes the runqemu script and support files
download from: http://downloads.yoctoproject.org/releases/yocto/yocto-1.2/toolchain/
- 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
- 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”
- Setup your Linux host system
- For my Ubuntu x64 12.04 system I ran the following command to setup my system.
- See the Yocto getting started guide for more information on the setup required for various Linux distros: http://www.yoctoproject.org/docs/1.0/yocto-quick-start/yocto-project-qs.html
- Build Yocto
- Download the Latest stable Yocto build system.
- tar xjf poky-denzil-7.0.1.tar.bz2
- source poky-denzil-7.0.1/oe-init-build-env poky-denzil-7.0.1-build
- Edit poky-denzil-7.0.1-build/vonf/local.conf
- Tailor MACHINE to the bsp you want to build.
- Edit poky-denzil-7.0.1-build/conf/bblayers.conf
- Specify the meta-intel you checkeout
- Build Yocto
- butbake core-image-sato
- This will create a kernel that is sufficient to build sep and vtss
Install Intel® VTune™ Amplifier 2013 for Systems
- Install Intel® VTune™ Amplfier 2013 for Systems on your Linux host. .
- You will need to build the power driver and load it on your target in order to collect power data.
- cd $VTUNE_INSTALL/powerdk
- 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:
- 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
- Load the power driver on your target.
- scp $VTUNE_INSTALL/powerdk/src/apwr*.ko root@target_io:/home/root
- Login to your target
- insmod- apwr*.ko
- Verify the sep and vtsspp drivers loaded.
- lsmod | grep apwr
- Install the remote collection binaries on the target
- Copy the contents of $VTUNE_INSTALL/target/linux32 (or linux64 depending on your target).
- scp linux32 root@target_ip:/home/root
- Cross build the power driver
- Load the power driver on your target
Setup target to not require a password
- Make sure your root directory has a .ssh directory and only the owner had read/write/execute access on it.
- cat ~/.ssh/id_dsa.pub | ssh root@ip_target “ cat >> /home/root/.ssh/authorized_keys”
- On the target chmod 600 /home/root/.ssh/authorized_keys
- Verify you can now login without password
- ssh root@target_ip
Run Intel® Vtune™ Amplifier 2013 for Systems remote collector on your application
- Set up some target environment variables
- export AMPLXE_TARGET_PRODUCT_DIR=/home/root/linux32
- From the location you copied the remote collection binaries
- export AMPLXE_TARGET_TMP_DIR=/tmp
- Run collection
- amplxe-runss.py –target=root@ip_target -pwr-config=sleep,frequency –result-dir r@@@ -- /tmp/hello
- 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 2013 for Systems results
1. amplxe-gui r000