Energy Analysis User Guide

ID 767268
Date 3/31/2023
Public

Build and Manage Energy Analysis Driver

Before running an energy analysis on a system, make the appropriate drivers are available on that system.

Energy analysis drivers for Windows* systems are pre-built as part of the Intel® SoC Watch package and require no further action.

Some energy analysis metrics may be available pre-installed with your Linux* or Android* operating system. Before installing any drivers, use the -help option to generate a list of metrics available with the pre-installed drivers. For additional metrics, you can manually install the drivers available with the Intel SoC Watch package using the steps detailed below for either your Linux or Android target system. Once this step is completed, use the -help option again and you should see an extended list including the additional metrics exposed by the provided drivers.

Install Drivers on a Linux* System

Intel SoC Watch uses the kernel driver to enable the energy analysis. The energy analysis driver, or Intel SoC Watch 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:

  1. Configure the basic software environment.

  2. Build and (re)load the energy analysis driver.

Configure 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_TIMER_STATS=y
  • CONFIG_X86_ACPI_CPUFREQ=m (or CONFIG_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.

Build and (Re)Load the Driver

If the drivers are not installed or if the Intel SoC Watch executable requires a more recent version of the drivers then you will need to compile the drivers from source. To compile drivers from source, the kernel-headers package for the kernel running on the target machine must be installed. For instance, if your target device is running kernel version 3.9.10-100.fc17.x86_64 then the package kernel-headers-3.9.10-100.fc17.x86_64 must be installed.

NOTE:

To perform these steps, make sure you have root or sudo permissions.

  • For target systems with an Intel Atom® processor, change to the /home/socwatch/socwatch_linux_<version>_<architecture> directory and compile the drivers:

    > cd /home/socwatch/socwatch_linux_v2_3_x86
    > sh ./build-drivers -l -k <kernel-build-dir> -s <full-path-to-sign-file>
  • For target systems with an Intel® Core™ processor, change to the /home/socwatch/socwatch_linux_<version>_<architecture> directory and compile the drivers:

    > cd /home/socwatch/socwatch_linux_v2_3_x86
    > sh ./build-drivers -l -k <kernel-build-dir> -n -s <full-path-to-sign-file>

Detailed steps are available in the Intel SoC Watch User's Guide for Linux* OS and Android* OS, which can be found in the Intel SoC Watch package files located in the Targets subdirectory of the Intel System Studio installation directory or from https://software.intel.com/en-us/intel-socwatch-android-linux-user-guide.

Install the Energy Analysis Collector on the Target Android System

  1. On the host, unzip the remote target package, system_studio_target.tgz, located, by default, in the Targets subdirectory of the Intel® System Studio installation directory.

  2. Depending on the target operating system or Intel architecture, run the required install script:

    • socwatch_android_vx.x.x/socwatch_android_install.bat on a Windows host.

    • 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 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 with socwatch_android_install.bat.

  • See the Intel SoC Watch User's Guide (socwatch_<OS>_users_guide.pdf), for detailed instructions on building and loading the Intel SoC Watch drivers for your target system, and instructions and tips for viewing the data directly on the target.