Intel® VTune™ Amplifier
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.
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 http://archive.ubuntu.com/ubuntu xenial main
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main
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
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.
Create a .config file with the same configuration you have for your running kernel:
cp /boot/config-`uname -r` .config
make olddefconfig
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.
Build objtool. This tool is required for building the sampling driver.
sudo apt install libelf-dev
make -C tools/ objtool
Build the kernel with the new .config file:
make -j `getconf _NPROCESSORS_ONLN` deb-pkg
Install the kernel and kernel modules:
sudo dpkg -i linux-*.deb
Reboot the machine with the new kernel.