diff --git a/documentation/README.html b/documentation/README.html index 3b642f5..16ae3ed 100644 --- a/documentation/README.html +++ b/documentation/README.html @@ -172,7 +172,34 @@ file descriptors STDIN_FILENO/STDOUT_FILENO/STDERR_FILENO< It is therefore strongly recommended to use the thread-safe library only for applications which can cope with the limitations described above.
+To use profiling, two steps are required. First of all, your program must be compiled with +the gcc command line option -pg. This instructs the compiler to generate special +profiling code in the prologue and epilogue of each function. Additionally, the program +must be linked with libprofile.a. To do this, either manually add +-lprofile to the linker command line, or modify the specs file as follows. +Find the lines that look like this (it may actually differ silghtily from your specs file, +but the important thing is that the line before the line to be modified reads lib:): +
+lib: +--start-group -lc --end-group ++You will have to modify this to look like this: +
+lib:
+%{pg: -lprofile} --start-group -lc --end-group
+
+Normally, the specs file is located at the compilers installation directory. For cross-compilers,
+this is /usr/local/amiga/lib/gcc/ppc-amigaos/compiler-version/specs. For a native compiler,
+it's in gcc:lib/gcc/ppc-amigaos/compiler-version/specs. Most likely, your compiler will already have this added to it's specs file.
+
+Profiling makes use of a special PowerPC facility called the Performance Monitor. It +allows to "mark" tasks and count only during while a marked task is running. This allows +performance analysis to be made independant of the actual system load. The Performace Monitor +is available on all PowerPC models supported by AmigaOS 4 except for the 603e, and +embedded versions of the PowerPC like the 405 and 440 series. Consult the manual +of the appropriate chip for more information.