From: Amos Jeffries Date: Tue, 11 Jan 2011 07:31:04 +0000 (-0700) Subject: Prevent extra lines being pulled into xprof_type.h X-Git-Tag: take00~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b616062e27289b71b8643b3acf09e37c37695ce1;p=thirdparty%2Fsquid.git Prevent extra lines being pulled into xprof_type.h --- diff --git a/lib/profiler/Profiler.h b/lib/profiler/Profiler.h index 8e57feb2c0..4b3b0fd643 100644 --- a/lib/profiler/Profiler.h +++ b/lib/profiler/Profiler.h @@ -13,8 +13,8 @@ extern "C" { #if !USE_XPROF_STATS -#define PROF_start(ARGS) ((void)0) -#define PROF_stop(ARGS) ((void)0) +#define PROF_start(probename) ((void)0) +#define PROF_stop(probename) ((void)0) #else /* USE_XPROF_STATS */ @@ -51,8 +51,8 @@ extern "C" { extern void xprof_stop(xprof_type type, const char *timer); extern void xprof_event(void *data); -#define PROF_start(type) xprof_start(XPROF_##type, #type) -#define PROF_stop(type) xprof_stop(XPROF_##type, #type) +#define PROF_start(probename) xprof_start(XPROF_##probename, #probename) +#define PROF_stop(probename) xprof_stop(XPROF_##probename, #probename) #endif /* USE_XPROF_STATS */ diff --git a/lib/profiler/xprof_type.h b/lib/profiler/xprof_type.h index 49dd19b016..f306038808 100644 --- a/lib/profiler/xprof_type.h +++ b/lib/profiler/xprof_type.h @@ -27,6 +27,7 @@ typedef enum { XPROF_StringReset, XPROF_aclCheckFast, XPROF_aclMatchAclList, + XPROF_calloc, XPROF_clientSocketRecipient, XPROF_commHandleWrite, XPROF_comm_accept, @@ -50,12 +51,17 @@ typedef enum { XPROF_file_open, XPROF_file_read, XPROF_file_write, + XPROF_free, + XPROF_free_const, + XPROF_hash_lookup, XPROF_headersEnd, XPROF_httpRequestFree, XPROF_httpStart, + XPROF_malloc, XPROF_mem_hdr_write, XPROF_parseHttpRequest, XPROF_read, + XPROF_realloc, XPROF_recv, XPROF_send, XPROF_storeClient_kickReads, @@ -66,6 +72,10 @@ typedef enum { XPROF_storeRelease, XPROF_storeWriteComplete, XPROF_write, + XPROF_xcalloc, + XPROF_xcountws, + XPROF_xmalloc, + XPROF_xrealloc, XPROF_LAST } xprof_type; #endif diff --git a/scripts/source-maintenance.sh b/scripts/source-maintenance.sh index 3acebeb710..fea3842ce5 100755 --- a/scripts/source-maintenance.sh +++ b/scripts/source-maintenance.sh @@ -121,7 +121,7 @@ echo "/* AUTO-GENERATED FILE */" >>${ROOT}/lib/profiler/list echo "#if USE_XPROF_STATS" >>${ROOT}/lib/profiler/list echo "typedef enum {" >>${ROOT}/lib/profiler/list echo "XPROF_PROF_UNACCOUNTED," >>${ROOT}/lib/profiler/list -grep -R -h "PROF_start.*" ./* | sed -e 's/ //g; s/PROF_start(/XPROF_/; s/);/,/' | sort -u >>${ROOT}/lib/profiler/list +grep -R -h "PROF_start.*" ./* | grep -v probename | sed -e 's/ //g; s/PROF_start(/XPROF_/; s/);/,/' | sort -u >>${ROOT}/lib/profiler/list echo " XPROF_LAST } xprof_type;" >>${ROOT}/lib/profiler/list echo "#endif" >>${ROOT}/lib/profiler/list echo "#endif" >>${ROOT}/lib/profiler/list diff --git a/src/comm/Loops.h b/src/comm/Loops.h index 6d5ec34d93..915abba73b 100644 --- a/src/comm/Loops.h +++ b/src/comm/Loops.h @@ -9,7 +9,8 @@ * Defines are provided short-term for legacy code. These will disappear soon. */ -namespace Comm { +namespace Comm +{ /// Initialize the module on Squid startup extern void SelectLoopInit(void);