|
@@ -586,19 +586,31 @@ $ starpu_paje_sort paje.trace
|
|
|
\section PapiCounters PAPI counters
|
|
|
|
|
|
Performance counter values could be obtained from the PAPI framework if
|
|
|
-<c>./configure</c> detected the libpapi. One has to set the \ref STARPU_PROFILING
|
|
|
-environment variable to 1 and then specify which events to record with the
|
|
|
-\ref STARPU_PROF_PAPI_EVENTS environment variable. For instance:
|
|
|
+<c>./configure</c> detected the libpapi.
|
|
|
+
|
|
|
+In Debian, packages <c>libpapi-dev</c> and <c>libpapi5.7</c> provide required
|
|
|
+files. Package <c>papi-tools</c> contains a set of useful tools, for example
|
|
|
+<c>papi_avail</c> to see which counters are available.
|
|
|
+
|
|
|
+To be able to use Papi counters, one may need to reduce the level of the kernel
|
|
|
+parameter <c>kernel.perf_event_paranoid</c> to at least 2. See
|
|
|
+https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html for the
|
|
|
+security impact of this parameter.
|
|
|
+
|
|
|
+Then one has to set the \ref STARPU_PROFILING environment variable to 1 and
|
|
|
+specify which events to record with the \ref STARPU_PROF_PAPI_EVENTS
|
|
|
+environment variable. For instance:
|
|
|
|
|
|
\verbatim
|
|
|
export STARPU_PROFILING=1 STARPU_PROF_PAPI_EVENTS="PAPI_TOT_INS PAPI_TOT_CYC"
|
|
|
\endverbatim
|
|
|
|
|
|
+The comma can also be used to separate events to monitor.
|
|
|
+
|
|
|
In the current simple implementation, only CPU tasks have their events measured
|
|
|
-and require CPUs that support the PAPI events. All events that PAPI support are
|
|
|
-available from their documentation (https://icl.cs.utk.edu/projects/papi/wiki/PAPIC:Preset_Event_Definitions).
|
|
|
-It is important to note that not all events are available on all systems, and
|
|
|
-general PAPI recommendations should be followed.
|
|
|
+and require CPUs that support the PAPI events. It is important to note that not
|
|
|
+all events are available on all systems, and general PAPI recommendations
|
|
|
+should be followed.
|
|
|
|
|
|
The counter values can be accessed using the profiling interface:
|
|
|
\code{.c}
|