Configure Yocto Project* and
Intel® VTune™
Profiler with the Linux* Target Package
Intel® VTune™
with the Linux* Target Package Profiler
Intel® VTune™
can collect and analyze performance data on embedded Linux* devices. This topic provides an example of setting up
Profiler
Intel VTune
to collect performance data on an embedded device running Yocto Project*. The first section provides information for a typical use case where the required collectors are automatically installed. The second section provides steps to manually install the collectors and the
Profiler
VTune
drivers for hardware event-based sampling data collection.
Profiler
Automatically Configure and Run Remote Analysis
Use the following steps on the host system to set up and launch the analysis on the embedded device:
- Set up a password-less SSH access to the target using RSA keys.
- OpenVTuneand create a new project.Profiler
- Select theremote Linux (SSH)analysis target and specify the collection details.VTuneconnects to the target system and installs the appropriate collectors. If the automatic installation fails or if you want to collect hardware event-based sampling with theProfilerVTunedrivers, follow the instructions below to manually configure the target system.Profiler
- Select the analysis type.
- Start the analysis.
Manually Configure the Linux Target System
Use these steps only if the automatic installation fails.
- Copy the target package archive to the target device. The following target packages are available:
- <>/target/vtune_- provides hardware event-based sampling collector only (SEP) for x86 systems_target_sep_x86.tgzprofiler
- - provides all<install-dir>/target/vtune__target_x86.tgzprofilerVTunecollectors for x86 systemsProfiler
- - provides hardware event-based sampling collector only (SEP) for 64-bit systems<install-dir>/target/vtune__target_sep_x86_64.tgzprofiler
- - provides all<install-dir>/target/vtune__target_x86_64.tgzprofilerVTunecollectors for 64-bit systemsProfiler
For example, the following command copies thevtune_package to the embedded device using SCP:_target_x86_64.tgzprofilerscp -r vtune_profiler_target_x86_64.tgz root@123.45.67.89:/opt/intel/ - Extract the file on the target system. For example:tar -xvsf vtune_profiler_target_x86_64.tgz
- Make sure the sampling driver is available on the target system. The installation output should inform you if building the sampling driver is required. If it is not, you will need to build the sampling driver and install it on the target system.If the compiler toolchain is available on the target embedded system, build the driver on the target device using the following steps:
- Open a command prompt and navigate to the<install-dir>/sepdk/srcdirectory. For example:cd /opt/intel/vtune_profiler_2020.0.0.0/sepdk/src
- Build the driver using the./build-drivercommand. For example:./build-driver -ni \ --kernel-src-dir=/usr/src/kernel/ \ --kernel-version=4.4.3-yocto-standard \ --make-args="PLATFORM=x64 ARITY=smp"
- Load the driver into the kernel using the./insmod-sepcommand.
If the compiler toolchain is not available on the target embedded system, build the driver on the host system and install it on the target device using the following steps:- Open a command prompt and navigate to the<install-dir>/sepdk/srcdirectory. For example:cd /opt/intel/vtune_profiler_2020.0.0.0/sepdk/src
- Cross-build the driver using the using the./build-drivercommand. Provide the cross-compiler (if necessary) and the target kernel source tree for the build. For example:mkdir drivers ./build-driver -ni \ --c-compiler=i586-i586-xxx-linux-gcc \ --kernel-version=4.4.3-yocto-standard \ --kernel-src-dir=/usr/src/kernel/ \ --make-args="PLATFORM=x32 ARITY=smp" \ --install-dir=./drivers
- Copy thesepdk/src/driversfolder to the target system.
- Load the driver into the kernel using the./insmod-sepcommand.