Visible to Intel only — GUID: GUID-83D74F3D-0C76-4C16-A208-4C45B80364D4
Visible to Intel only — GUID: GUID-83D74F3D-0C76-4C16-A208-4C45B80364D4
Rebuild and Install the Kernel for GPU Analysis
To collect i915 ftrace events that are required for a detailed analysis of GPU utilization, your Linux kernel should be properly configured.
If VTune Profiler cannot start an analysis and you see an error message (Collection of GPU usage events cannot be enabled. i915 ftrace events are not available), you must rebuild and install the re-configured module i915.
For kernel versions 4.14 and newer, enable these settings:
- CONFIG_EXPERT=y
- CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=y
If you update the kernel rarely, it is sufficient to configure and rebuild only module i915.
If you update the kernel often, build the special kernel for GPU analysis. Follow this procedure.
Installing the kernel requires root permissions.
Add source package repositories for your Ubuntu version.
For example, on Ubuntu Bionic Beaver* add:
sudo add-apt-repository -s "deb http://ru.archive.ubuntu.com/ubuntu/ bionic main restricted"
Install build dependencies:
sudo apt -y build-dep linux linux-image-$(uname -r) sudo apt -y install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
Install kernel headers:
sudo apt -y install linux-headers-$(uname -r)
Create a folder for kernel source:
mkdir -p /tmp/kernel cd !$
Download kernel sources:
apt -y source linux cd linux-*
If you have a custom kernel, you need to find the corresponding source code the kernel belongs to.
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.
Create a full .config file for the kernel:
make olddefconfig
Build objtool. This tool is required for building the sampling driver.
make -C tools/ objtool
Build the kernel with the new .config file:
make -j `getconf _NPROCESSORS_ONLN` deb-pkg
If you are using a custom kernel, use this command instead:
make LOCALVERSION= -j `getconf _NPROCESSORS_ONLN` deb-pkg
Install the kernel and kernel modules:
sudo dpkg -i linux-*.deb
Reboot the machine with the new kernel.