From: Bruno Haible Date: Sun, 30 Sep 2018 17:27:56 +0000 (+0200) Subject: timevar: Include documentation in gnulib manual. X-Git-Tag: v1.0~5393 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=af502d1026949c53efbccbd289d5e2b2da586a62;p=gnulib.git timevar: Include documentation in gnulib manual. * doc/timevar.texi: Change node and section name to 'Profiling of program phases'. In the code snippets, tweak the #includes and use GNU coding style. * doc/gnulib.texi: Include timevar.texi. --- diff --git a/ChangeLog b/ChangeLog index 03aab337a3..690451b43c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-09-30 Bruno Haible + + timevar: Include documentation in gnulib manual. + * doc/timevar.texi: Change node and section name to 'Profiling of + program phases'. + In the code snippets, tweak the #includes and use GNU coding style. + * doc/gnulib.texi: Include timevar.texi. + 2018-09-27 Akim Demaille timevar: import from Bison. diff --git a/doc/gnulib.texi b/doc/gnulib.texi index 4ddb34dd0d..2f53059581 100644 --- a/doc/gnulib.texi +++ b/doc/gnulib.texi @@ -6367,6 +6367,7 @@ to POSIX that it can be treated like any other Unix-like platform. * Quoting:: * error and progname:: * gcd:: +* Profiling of program phases:: * Library version handling:: * Supporting Relocation:: * func:: @@ -6399,6 +6400,8 @@ to POSIX that it can be treated like any other Unix-like platform. @include gcd.texi +@include timevar.texi + @include check-version.texi @include relocatable-maint.texi diff --git a/doc/timevar.texi b/doc/timevar.texi index 86ef8115e4..ae818fbdd4 100644 --- a/doc/timevar.texi +++ b/doc/timevar.texi @@ -1,7 +1,8 @@ -@node timevar -@section timevar +@node Profiling of program phases +@section Profiling of program phases -A simple self-profiling module based on timers. +The module @samp{timevar} provides a simple self-profiling facility, +based on timers. @smallexample Execution times (seconds) @@ -44,11 +45,13 @@ the following example. #include #include "timevar.h" +#include #include "read.h" #include "work.h" #include "output.h" -int main (void) +int +main (void) @{ timevar_enabled = true; timevar_init (); @@ -76,9 +79,10 @@ with, for instance, in @file{work.c} @smallexample #include -#include +#include "work.h" -void work (void) +void +work (void) @{ timevar_push (tv_work_phase1); work1 ();