Pārlūkot izejas kodu

document how to run starpu with gprof

Samuel Thibault 9 gadi atpakaļ
vecāks
revīzija
8af17e7d83
2 mainītis faili ar 35 papildinājumiem un 0 dzēšanām
  1. 4 0
      configure.ac
  2. 31 0
      doc/doxygen/chapters/05check_list_performance.doxy

+ 4 - 0
configure.ac

@@ -82,6 +82,10 @@ AC_CHECK_PROGS(PROG_STAT,gstat stat)
 AC_CHECK_PROGS(PROG_DATE,gdate date)
 AC_OPENMP
 
+if test x$enable_perf_debug = xyes; then
+    enable_shared=no
+fi
+
 LT_PREREQ([2.2])
 LT_INIT([win32-dll])
 

+ 31 - 0
doc/doxygen/chapters/05check_list_performance.doxy

@@ -312,4 +312,35 @@ Statistics on the execution can then be obtained by using <c>export
 STARPU_BUS_STATS=1</c> and <c>export STARPU_WORKER_STATS=1</c> .
  More details on performance feedback are provided in the next chapter.
 
+\section OverheadProfiling Overhead Profiling
+
+\ref OfflinePerformanceTools can already provide an idea of to what extent and
+which part of StarPU bring overhead on the execution time. To get a more precise
+analysis of the parts of StarPU which bring most overhead, gprof can be used.
+
+First, recompile and reinstall StarPU with gprof support:
+
+\code
+./configure --enable-perf-debug --disable-shared --disable-build-tests --disable-build-examples
+\endcode
+
+Make sure not to leave a dynamic version of StarPU in the target path: remove
+any remaining libstarpu-*.so
+
+Then relink your application with the static StarPU library, make sure that
+running ldd on your application does not mention libstarpu (i.e. it's really statically-linked).
+
+\code
+gcc test.c -o test $(pkg-config --cflags starpu-1.3) $(pkg-config --libs starpu-1.3)
+\endcode
+
+Now you can run your application, and a gmon.out file should appear in the
+current directory, you can process by running gprof on your application:
+
+\code
+gprof ./test
+\endcode
+
+That will dump an analysis of the time spent in StarPU functions.
+
 */