From: Denys Vlasenko Date: Tue, 16 Jul 2013 10:18:59 +0000 (+0200) Subject: Group USE_CUSTOM_PRINTF define with other tweakables X-Git-Tag: v4.9~194 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76da831a4159a58cd321328498496e772e3b4afc;p=strace Group USE_CUSTOM_PRINTF define with other tweakables No code changes. Signed-off-by: Denys Vlasenko --- diff --git a/defs.h b/defs.h index 09488a22..3c7e2cf9 100644 --- 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 diff --git a/vsprintf.c b/vsprintf.c index f6019f0e..92fe1a7a 100644 --- a/vsprintf.c +++ b/vsprintf.c @@ -11,7 +11,7 @@ #include "defs.h" -#ifdef USE_CUSTOM_PRINTF +#if USE_CUSTOM_PRINTF #include #include