commit b2c1b1dd90dcb71fe2ff7221025c01a76d4f4cac
parent 397b88a028b4d40e8cd70bb1a92110527ab0a52c
Author: Paul <paul@claws-mail.org>
Date: Tue, 25 Feb 2025 10:03:58 +0000
add configure option --enable_timing_debug
timing debug is very noisy yet infrequently useful
Diffstat:
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -337,6 +337,10 @@ AC_ARG_ENABLE(more-archive-debug,
[ --enable-more-archive-debug Build with additional debug calls in archive plugin],
[enable_more_archive_debug=$enableval], [enable_more_archive_debug=no])
+AC_ARG_ENABLE(timing-debug,
+ [ --enable-timing-debug Build with timing debug calls],
+ [enable_timing_debug=$enableval], [enable_timing_debug=no])
+
manualdir='${docdir}/manual'
AC_ARG_WITH(manualdir,
[ --with-manualdir=DIR Manual directory],
@@ -1061,6 +1065,15 @@ else
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING([whether to build with timing debug calls])
+if test x$enable_timing_debug = xyes; then
+ more_debug_output_modules="$more_debug_output_modules timing"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(DEBUG_TIMING, 1, [Define if you want timing debug calls])
+else
+ AC_MSG_RESULT(no)
+fi
+
dnl *************************
dnl ** section for plugins **
dnl *************************
diff --git a/src/common/timing.h b/src/common/timing.h
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 2005-2012 Colin Leroy <colin@colino.net> & the Claws Mail team
+ * Copyright (C) 2005-2025 the Claws Mail team and Colin Leroy
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@
} \
} while (0)
-#if 0 /* set to 0 to measure times at various places */
+#ifndef DEBUG_TIMING
#define START_TIMING(str) do {} while(0);
#define END_TIMING() do {} while(0);
#else