]> granicus.if.org Git - strace/commitdiff
Group USE_CUSTOM_PRINTF define with other tweakables
authorDenys Vlasenko <dvlasenk@redhat.com>
Tue, 16 Jul 2013 10:18:59 +0000 (12:18 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Tue, 16 Jul 2013 10:18:59 +0000 (12:18 +0200)
No code changes.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
defs.h
vsprintf.c

diff --git a/defs.h b/defs.h
index 09488a2216e34bb07b45954e41d0a67bfed775c4..3c7e2cf9e240eca4d179378788aad2f044c0cf1f 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -146,6 +146,15 @@ extern char *stpcpy(char *dst, const char *src);
 #define USE_SEIZE 1
 /* To force NOMMU build, set to 1 */
 #define NOMMU_SYSTEM 0
+/*
+ * Set to 1 to use speed-optimized vfprintf implementation.
+ * It results in strace using about 5% less CPU in user space
+ * (compared to glibc version).
+ * But strace spends a lot of time in kernel space,
+ * so overall it does not appear to be a significant win.
+ * Thus disabled by default.
+ */
+#define USE_CUSTOM_PRINTF 0
 
 #if (defined(SPARC) || defined(SPARC64) \
     || defined(I386) || defined(X32) || defined(X86_64) \
@@ -575,17 +584,10 @@ void error_msg_and_die(const char *fmt, ...) __attribute__ ((noreturn, format(pr
 void perror_msg_and_die(const char *fmt, ...) __attribute__ ((noreturn, format(printf, 1, 2)));
 void die_out_of_memory(void) __attribute__ ((noreturn));
 
-#ifdef USE_CUSTOM_PRINTF
+#if USE_CUSTOM_PRINTF
 /*
- * Speed-optimized vfprintf implementation.
  * See comment in vsprintf.c for allowed formats.
  * Short version: %h[h]u, %zu, %tu are not allowed, use %[l[l]]u.
- *
- * It results in strace using about 5% less CPU in user space
- * (compared to glibc version).
- * But strace spends a lot of time in kernel space,
- * so overall it does not appear to be a significant win.
- * Thus disabled by default.
  */
 int strace_vfprintf(FILE *fp, const char *fmt, va_list args);
 #else
index f6019f0e16ba271a25c7dcccfe92a1218228b331..92fe1a7a622a210a8d0f4d7e6307e9e910762820 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "defs.h"
 
-#ifdef USE_CUSTOM_PRINTF
+#if USE_CUSTOM_PRINTF
 
 #include <stdarg.h>
 #include <limits.h>