Rebuild and Install the Kernel for GPU Analysis

To enable GPU usage events (i915 ftrace events) collection, your Linux kernel should be properly configured. For example, for kernel 4.14 and higher, these settings should be enabled: CONFIG_EXPERT=y and CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=y.

If the Intel® VTune™ Amplifier cannot start an analysis and provides an error message "Collection of GPU usage events cannot be enabled. i915 ftrace events are not available", you need to rebuild and install the re-configured kernel. For example, for Ubuntu* 16.04.4 (kernel 4.14.20) running on Intel microarchitecture code name Skylake, configure and install the kernel as follows:


Configuring kernel requires root permissions.

  1. Add (or uncomment) source package repositories for your Ubuntu version in /etc/apt/sources.list.

    For example, on Ubuntu Xenial Xerus* you should have:

    deb-src xenial main
    deb-src xenial-updates main
  2. Update your system to prepare it for building the kernel:

    sudo apt update
    sudo apt build-dep linux-image-`uname -r`
    sudo apt install fakeroot libssl-dev

  3. Install kernel sources.

    If you have a standard kernel coming with your distribution, you can retrieve kernel sources with your package manager:

    sudo apt install linux-source

    The kernel source is installed to /usr/src/linux-source-x.y.z/linux-source-x.y.z.tar.bz2. Extract the kernel source from the archive and use this source directory.

    If you have a custom kernel, you need to find the corresponding source code where the kernel belongs.

  4. Create a .config file with the same configuration you have for your running kernel:

    cp /boot/config-`uname -r` .config
    make olddefconfig

  5. In the new .config file, make sure the following settings are enabled:





    Update the file, if required, and save.

  6. Build objtool. This tool is required for building the sampling driver.

    sudo apt install libelf-dev
    make -C tools/ objtool

  7. Build the kernel with the new .config file:

    make -j `getconf _NPROCESSORS_ONLN` deb-pkg

  8. Install the kernel and kernel modules:

    sudo dpkg -i linux-*.deb

  9. Reboot the machine with the new kernel.

Optimization Notice: 


For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)