Quantcast
Channel: C#
Viewing all articles
Browse latest Browse all 1853

Sampling and Power Drivers

$
0
0

Intel® VTune™ Amplifier uses kernel drivers to enable the hardware event-based sampling and Intel Energy Profiler analysis (the latter is available with the VTune Amplifier for Systems only). VTune Amplifier installer automatically uses the Sampling Driver Kit and the Power Driver Kit to build drivers for your kernel with the default installation options. If the drivers were not built and set up during installation (for example, lack of privileges, missing kernel development RPM, and so on), VTune Amplifier provides and error message and enables driverless sampling data collection based on the Linux Perf* tool functionality, which has a limited scope of analysis options. But you may still enable a full-scale sampling data collection by building and loading the drivers manually as a root user after product installation. For details, see instructions on:

Note

  • You may need kernel header sources and other additional software to build and load the kernel drivers on Linux. For details, see the README.txt files in the sepdk/src and powerdk/src directories.

  • A Linux kernel update can lead to incompatibility with VTune Amplifier drivers set up on the system for event-based sampling (EBS) analysis and power analysis. If the system has installed VTune Amplifier boot scripts to load the drivers into the kernel each time the system is rebooted, the drivers will be automatically re-built by the boot scripts at system boot time. Kernel development sources required for driver rebuild should correspond to the Linux kernel update.

Drivers Installation Options on Linux* Systems

During product installation on Linux OS, you may control the drivers installation options via the Change advanced options menu item. VTune Amplifier provides the following options:

Use This Option

To Do This

Sampling driver install type [build driver (default) / driver kit files only ]

Power driver install type [build driver (default) / driver kit files only ]

Choose the driver installation option. By default, VTune Amplifier uses the Sampling/Power Driver Kit to build the driver for your kernel. You may change the option to driver kit files only if you want to build the driver manually after installation.

Driver access group [ vtune (default) ]

Set the driver access group ownership to determine which set of users can perform the collection on the system. By default, the group is vtune. You may set your own group during installation in the Advanced options or change it manually after installation by executing: ./boot-script -–group <your_group> from the <install_dir>/sepdk/src or <install_dir>/powerdk/srcdirectories.

By default, <install_dir> is /opt/intel/<vtune_amplifier_version>.

Driver permissions [ 660 (default) ]

Change permissions for the driver.

Load driver [ yes (default) ]

Load the driver into the kernel.

Install boot script [ yes (default) ]

Use a boot script that loads the driver into the kernel each time the system is rebooted. The boot script can be disabled later by executing: ./boot-script --uninstall from the <install_dir>/sepdk/src or <install_dir>/powerdk/src directories.

Enable per-user collection mode [no (default) / yes]

Install the hardware event-based collector driver with the per-user filtering on. When the filtering is on, the collector gathers data only for the processes spawned by the user who started the collection. When it is off (default), samples from all processes on the system are collected. Consider using the filtering to isolate the collection from other users on a cluster for security reasons. The administrator/root can change the filtering mode by rebuilding/restarting the driver at any time. A regular user cannot change the mode after the product is installed.

Note

For MPI application analysis on a Linux* cluster, you may enable the Per-user Hardware Event-based Sampling mode when installing the Intel Cluster Studio XE. This option ensures that during the collection the VTune Amplifier collects data only for the current user. Once enabled by the administrator during the installation, this mode cannot be turned off by a regular user, which is intentional to preclude individual users from observing the performance data over the whole node including activities of other users.

After installation, you can use the respective -vars.sh files to set up the appropriate environment (PATH, MANPATH) in the current terminal session.

Driver build options …

Specify the location of the kernel header files on this system, the path and name of the C compiler to use for building the driver, the path and name of the make command to use for building the driver.

Driverless Event-Based Sampling Collection

For Advanced Hotspots, General Exploration and Custom event-based sampling analysis types on Linux* and Android* OS, you may not need root privileges and installing the sampling driver if your system is based on kernel 2.6.32 or higher, which exports CPU PMU programming details over /sys/bus/event_source/devices/cpu/format file system. This driverless sampling collection mode is based on the Linux Perf* functionality. VTune Amplifier automatically enables the driverless collection if the sampling driver cannot be installed with the product installation.

To resolve symbols for the Linux kernel, make sure you have enough permissions to read kernel symbol information from the /proc/kallsyms file. To do this, verify that the /proc/sys/kernel/kptr_restrict file contains values that enable reading /proc/kallsyms and providing non-zero addresses for the kernel symbols:

  • If the kptr_restrict value is 2, the kernel addresses are hidden regardless of privileges the current user has.
  • If the kptr_restict value is 1, addresses are provided if the current user has a CAP_SYSLOG capability.
  • If the kptr_restrict value is 0, kernel addresses are provided without limitations.

See more details at: http://lwn.net/Articles/420403/, http://man7.org/linux/man-pages/man7/capabilities.7.html.

Limitations of the driverless sampling collection:

  • Since the driverless collection is based on the Linux Perf functionality. All Perf limitations fully apply to the VTune Amplifier sampling analysis as well. For example, your operating system limits on the maximum amount of files opened by a process as well as maximum memory mapped to a process address space still apply and may affect Perf-based profiling. For more information, see the Tutorial: Troubleshooting and Tips topic at https://perf.wiki.kernel.org/index.php/Main_Page.

  • Сall stack collection and MRTE/JIT specific profiling is not supported

  • For driverless event-based sampling data collection, VTune Amplifier supports local and remote Launch Application, Attach to Process and Profile System target types. However, ыupport for these target types fully depends on the Linux Perf profiling credentials specified in the /proc/sys/kernel/perf_event_paranoid file and managed by the administrator of your system using root credentials. For more information see the perf_event related configuration files topic at http://man7.org/linux/man-pages/man2/perf_event_open.2.html. By default, only user processes profiling at the both user and kernel spaces is permitted, so you need granting wider profiling credentials via the perf_event_paranoid file to employ the Profile System target type.

  • For the driverless data collection, VTune Amplifier sampling drivers should be unloaded.

Inglese

Viewing all articles
Browse latest Browse all 1853

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>