mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-14 06:19:25 +01:00
* fixed profiler section
This commit is contained in:
parent
f67fb1b0eb
commit
9caa7fa250
@ -1904,19 +1904,23 @@ You can compile your programs with profiling support. for this, you just
|
|||||||
have to use the compiler switch \var{-pg}. The compiler wil insert the
|
have to use the compiler switch \var{-pg}. The compiler wil insert the
|
||||||
necessary stuff for profiling.
|
necessary stuff for profiling.
|
||||||
|
|
||||||
When you have done this, you can run your program uder the gnu profiler,
|
When you have done this, you can run your program as you normally would run
|
||||||
\var{gprof}, as follows :
|
it.
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
gprog yourexe
|
yourexe
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
Where \file{yourexe} is the name of your executable.
|
Where \file{yourexe} is the name of your executable.
|
||||||
|
|
||||||
You may want to capture the outpus of the profiler in a file, since it can
|
When your program finishes a file called gmon.out is generated. Then you can start
|
||||||
be quite a lot, as follows:
|
the profiler to see the output. You can better redirect the output to a file, becuase
|
||||||
|
it could be quite a lot:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
gprog yourexe >gprof.out
|
gprof yourexe > profile.log
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
|
Hint: you can use the --flat option to reduce the amount of output of gprof. It will
|
||||||
|
then only output the information about the timings
|
||||||
|
|
||||||
For more information on the \gnu profiler \var{gprof}, see its manual.
|
For more information on the \gnu profiler \var{gprof}, see its manual.
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user