Switch between Intel VTune Performance Analyzer and Intel PTU is important. Regarding PTU documentation, PTU and VTune environments are not compatible. You must be sure to unload one before loading the other.
I created a small bash script to simply and neatly switch between these environments:switch-vtune-ptu.sh
switch-vtune-ptu script loads, switches and unloads vtune and ptu environments.
An environment includes:
- kernel modules
- devices in /dev
- init files in /etc/init.d
Usage: switch-vtune-ptu [options]
- -h: display this help
- -l [vtune|ptu]: load vtune or ptu (if one is already loaded, it unloads it first)
- -u [vtune|ptu]: unload vtune or ptu
- -d: display which environment is loaded