squid-3 profiling: nested profiling support

From: Adrian Chadd <adrian@dont-contact.us>
Date: Tue, 21 Nov 2006 14:19:23 +0800

I've modified the squid3 high-res profiling code to support nested profiling points.

http://www.creative.net.au/diffs/20061121-squid3-nested-profiling.diff

Change summary:

* in-progress statistics (start/stop/accumulated time) are now kept in a stack seperate
  from xprof_Timers;
* and xprof_start allocates a stack entry, xprof_stop deallocates a stack entry
  and updates the relevant xprof_Timers
* Timers are stopped/started as the profiling stack is used up and resumed once
  a call returns
* I haven't tested it; but it -should- support recursing profiling points as well
  as nested ones.

This work should make it easier to figure out where the actual CPU hogs are in the
Squid-3 codebase.

I'd like some review before I commit it just to make sure I haven't messed up.
I'll commit it in a couple of days unless I hear feedback to the contrary.

Thanks,

Adrian
Received on Mon Nov 20 2006 - 23:13:57 MST

This archive was generated by hypermail pre-2.1.9 : Wed Nov 29 2006 - 12:00:05 MST