Intel® VTune™ Amplifier

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:

Note

Configuring kernel requires root permissions.

  1. Upgrade your system to prepare it for building the kernel:

    $  apt-get update && apt-get upgrade
    $ apt-get install -y build-essential libncurses5-dev gcc libssl-dev

  2. Install kernel sources.

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

    $ apt-get install linux-source

    The kernel source is installed to /usr/src/.

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

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

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

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

    CONFIG_EXPERT=y

    CONFIG_FTRACE=y

    CONFIG_DEBUG_FS=y

    CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=y

    Update the file, if required, and save.

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

    $ make -j `getconf _NPROCESSORS_ONLN` deb-pkg

  6. Install the kernel and kernel modules:

    $ dpkg -i linux-*.deb

  7. Reboot the machine with the new kernel.

See Also