Note
Energy analysis is provided by the Intel® VTune™ Amplifier for Systems only. Energy analysis collection is supported for target Android*, Windows* or Linux* devices.
Installing Drivers on a Linux* System
Intel® VTune™ Amplifier uses the kernel driver to enable the energy analysis. The energy analysis driver is typically installed by default during the product installation. If the kernel on your Linux* system is not one of the supported kernels listed in the Release Notes, you need to build and load the driver manually as follows:
Configuring the Basic Software Environment
To compile the energy analysis driver, the target system must have the following software installed:
C compiler that was used to build the kernel and that is capable of compiling programs with anonymous structs/unions, for example, GCC* 2.96 or later.
Tools needed to build a C-based program, for example, GNU* make tool, native assembler, linker.
System headers, for example,
/usr/include/
.
In addition, the kernel version must be 2.6.32 or later and must be configured with the following options enabled:
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_TRACEPOINTS=y
CONFIG_FRAME_POINTER=y
CONFIG_COMPAT=y
CONFIG_TIMER_STATS=y
CONFIG_X86_ACPI_CPUFREQ=m
(orCONFIG_X86_ACPI_CPUFREQ=y
)CONFIG_INTEL_IDLE=y
Note
You can verify these options by checking the kernel config file (for example, /boot/config
, /proc/config.gz
, /usr/src/linux/.config
). Normally, these tools are installed, and kernel options are enabled, by default. However, administrators may remove/disable them from deployment systems, such as servers or embedded systems.
Configuring the Kernel Development Environment
Linux distributions based on kernel 2.6 * Red Hat Enterprise* Linux 6: Install the
kernel-*-devel-*.rpm
that is appropriate for the running kernel (on the third install CD)Red Hat Fedora* Core 12 and later: Download and install the
kernel-*-devel-*.rpm
that is appropriate for the running kernel from http://download.fedora.redhat.com/pub/fedora/linux/ or by using YUM:$ yum install kernel-devel
Novell* SuSE Linux Enterprise Server* 10, 11 and Novell OpenSuSE*11.x: Install the
kernel-source-*-`uname -m`.rpm
that is appropriate for the running kernelRed Flag* 5.x: Install the
kernel-*-devel-*.rpm
that is appropriate for the running kernel (on second install CD)Debian* 5.x and Ubuntu* 10.x: Install the GCC and kernel development environment via:
$ apt-get update
$ apt-get install build-essential
$ apt-get install linux-headers-`uname -r` 4
For kernels or Linux distributions not mentioned above, you need to set up the kernel build environment manually. This involves configuring the kernel sources (and hence kernel headers) to match the running kernel on the target system. For 2.6-based kernels, the kernel sources can be configured as follows:
# boot into the kernel you wish to build driver for # and make sure the kernel source tree is placed in #/usr/src/linux-`uname -r` # cd /usr/src/linux-`uname -r` vi Makefile # set EXTRAVERSION to a value corresponding to `uname -r` make mrproper cp /boot/config-`uname -r` .config make oldconfig make prepare make scripts
Once the configuration completes, make sure that UTS_RELEASE
in /usr/src/linux-`uname -r`/include/linux/version.h
or in /usr/src/linux-`uname -r`/include/linux/utsrelease.h
matches `uname -r`
.
Building and (Re)Loading the Driver
Once the standard development tools and proper kernel development environment are installed, you can build and load the driver:
Note
To perform these steps, make sure you have root or sudo permissions.
# build the driver: cd /path/to/powerdk/src/ ./build-driver # unload previously loaded driver from the kernel (if any): cd /path/to/powerdk/src/ ./rmmod-apwr2 # load the driver into the kernel: cd /path/to/powerdk/src/ sudo ./insmod-apwr2 # autoload the driver at boot time: cd /path/to/powerdk/src/ ./boot-script -g users -d /path/to/pre-built-drivers
If any errors occur during the building or loading of the driver, this may indicate a mismatch between the kernel sources and the running kernel. For load issues, check the /var/log/messages
file or the output of dmesg
.
Installing Energy Analysis Drivers on the Target Android System
If pre-installed drivers are not available, or the driver version does not match, follow these steps:
On the host, unzip the remote target package,
system_studio_target.tgz
, located, by default, in theTargets
subdirectory of the Intel System Studio installation directory.Depending on the target operating system or Intel architecture, run the required install script:
socwatch_android_vx.x.x/socwatch_android_install.bat
orwuwatch_android/wuwatch_android_install
on a Windows host.socwatch_android_vx.x.x/socwatch_android_install.bat
socwatch_android_vx.x.x/socwatch_android_install.sh
script on a Linux host or a Cygwin window on a Windows host
By default, the script installs the collector executables to the
/data/socwatch
or/data/wuwatch
directory on the Android target system. Use the-d
option to select a different install directory and the-s
option to define a specific target device if multiple devices are connected to the host.
Note
The
-s
option is not supported withsocwatch_android_install.bat
.- See the Intel SoC Watch /WuWatch User's Guide (
WakeUpWatch_<version>.pdf
, orsocwatch_<version>.pdf
), for detailed instructions on building and loading the power driver for your target system, and instructions and tips for viewing the data directly on the target.