--------------------- PatchSet 2582 Date: 2001/07/06 12:45:24 Author: akroonmaa Branch: cpuProfiling Tag: (none) Log: minor changes Members: lib/Profiler.c:1.1.2.3->1.1.2.4 Index: squid/lib/Profiler.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/Attic/Profiler.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/lib/Profiler.c 9 May 2001 22:20:55 -0000 1.1.2.3 +++ squid/lib/Profiler.c 6 Jul 2001 12:45:24 -0000 1.1.2.4 @@ -48,16 +48,17 @@ * modern CPU's has similar counters. * * Usage. - * Insert macro PROF(state, "probename") in strategic places in code. - * PROF(PR_start, "probename"); + * Insert macro PROF_state(probename) in strategic places in code. + * PROF_start(probename); * ... section of code measured ... - * PROF(PR_stop,"probename"); + * PROF_stop(probename); * + * probename must be added to profiling.h into xprof_type enum list + * with prepended "XPROF_" string. + * * Description. * PROF gathers stats per probename into structures. It indexes these - * structures by pointer value, not string contents. So, for each - * invocation of PROF meaning the same probe, you have to pass the same - * pointer to PROF. You can use string constants exactly as in example. + * structures by enum type index in an array. * * PROF records best, best, average and worst values for delta time, * also, if UNACCED is defined, it measures "empty" time during which @@ -117,9 +118,9 @@ /* Exported Data */ TimersArray *xprof_Timers = NULL; +int xprof_nesting = 0; /* Private stuff */ -int xprof_nesting = 0; static inline void xprof_update(xprof_stats_data * head)