[PATCH] debugs-refactor, v1

From: Kinkie <gkinkie_at_gmail.com>
Date: Mon, 17 Feb 2014 22:46:12 +0100

Hi all,
  the attached patch aims at simplifying debug, making it also more effective.

It:
- removes some of the API cruft (ctx_enter, ctx_exit, BuildPrefixInit)
- shuffles the remaining public functions to static members of Debug
- fixes clients still relying on old_debug (thanks to Amos)
- implements a compatibility wrapper for std::mutex (not all compilers
we care about implement it yet) relying on pthread mutexes if needed.
- increases the efficiency of debugs() message creation by reducing
the number of data copies
- the new debugs() call is reentrant and threadsafe on all platforms,
not just windows

One thing left behind is an issue in the cache.log output of
Acl::~Acl, which is likely caused by the data contained in the client.
A functional workaround has been found in using a SBuf instead of a
c-string to store the cfgline data member in Acl, but it's been left
out to avoid scope creep. If this branch is merged, that fix will be
done in a followup patch.

It's been build- and run- tested on ubuntu raring; it's being tested
in the build farm as we speak; it's possible that as results from that
come in some small changes will be needed, but the API is hopefully
fixed.

Feature branch at lp:~squid/squid/debugs-refactor.

-- 
    Kinkie

Received on Mon Feb 17 2014 - 21:46:20 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 18 2014 - 12:00:13 MST