1. MulticoreWare
  2. mcw
  3. x265


Clone wiki

x265 / Profiling

These instructions cover the profiling of x265 on Linux with Intel VTune 2015.

  • first you must have VTune installed and functional.
  • Next, load the VTune environment variables and paths via
$ source /opt/intel/vtune_amplifier_xe/amplxe-vars.sh
  • set ENABLE_VTUNE to ON in ccmake, then build x265
$ cd x265/build/linux
$ cmake ../../source
$ ccmake ../../source  # set ENABLE_VTUNE to ON, press [c] then [g]
$ make
  • Now start VTune Amplifier via amplxe-gui and run the instrumented x265 binary

x265 uses the VTune instrumentation API to label threads and display key tasks performed by each thread. You must enable the collection of "User Tasks" in order to see these events in the timeline graphs. To add another of these events, simply add the name to source/profile/cpuEvents.h and then add a new ProfileScopeEvent macro in the function you wish to instrument, and re-build.

Note that cmake caches the VTune paths so it is possible to re-build x265 with VTune enabled without sourcing the amplxe-vars.sh file, but if cmake runs again without the paths being properly initialized you will encounter build errors about a missing ittnotify.h header. If this occurs, simply source the amplxe-vars.sh and then run cmake once more.

x265's cmake scripts also support VTune use on Windows, the steps are roughly the same. You must ensure the VTune paths are set in your environment, run cmake and set ENABLE_TUNE=ON, then build x265.