[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

timevar: documentation

From: Bruno Haible
Subject: timevar: documentation
Date: Sun, 30 Sep 2018 01:01:27 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-134-generic; KDE/5.18.0; x86_64; ; )

Hi Akim,

How about the following patch to:
- include timevar.texi in the Gnulib documentation,
- mention '#include <stdio.h>', needed for stderr,
- use GNU coding style for function definitions,
- use #include "work.h". The common practice is to use #include <>
  for header files defined outside the package.

Also, Where is the documentation regarding
  - the comparison with profiling tools,
  - the multithreading,
  - child processes?


diff --git a/doc/gnulib.texi b/doc/gnulib.texi
index 4ddb34d..2f53059 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 
 * 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 
 @include gcd.texi
address@hidden timevar.texi
 @include check-version.texi
 @include relocatable-maint.texi
diff --git a/doc/timevar.texi b/doc/timevar.texi
index 86ef811..ae818fb 100644
--- a/doc/timevar.texi
+++ b/doc/timevar.texi
@@ -1,7 +1,8 @@
address@hidden timevar
address@hidden timevar
address@hidden Profiling of program phases
address@hidden 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.
 Execution times (seconds)
@@ -44,11 +45,13 @@ the following example.
 #include <config.h>
 #include "timevar.h"
+#include <stdio.h>
 #include "read.h"
 #include "work.h"
 #include "output.h"
-int main (void)
+main (void)
   timevar_enabled = true;
   timevar_init ();
@@ -76,9 +79,10 @@ with, for instance, in @file{work.c}
 #include <config.h>
-#include <work.h>
+#include "work.h"
-void work (void)
+work (void)
   timevar_push (tv_work_phase1);
   work1 ();

reply via email to

[Prev in Thread] Current Thread [Next in Thread]