summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-01-08 15:19:32 +0000
committerCarl Hetherington <carl@carlh.net>2011-01-08 15:19:32 +0000
commitbee34078e7426f6662a3c21ca3288808650c0aa1 (patch)
treecd94cb29c0a03bcd4e3b7ac9bfd5d9a191d3b86a /libs/pbd
parentaf0030a6de8bc8109bb3c343289816c91377b76c (diff)
Use DEBUG macros for SessionEvent debugging.
git-svn-id: svn://localhost/ardour2/branches/3.0@8482 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/debug.cc1
-rw-r--r--libs/pbd/pbd/debug.h1
-rw-r--r--libs/pbd/pool.cc7
3 files changed, 7 insertions, 2 deletions
diff --git a/libs/pbd/debug.cc b/libs/pbd/debug.cc
index 4f97ccff86..e7ec767f87 100644
--- a/libs/pbd/debug.cc
+++ b/libs/pbd/debug.cc
@@ -33,6 +33,7 @@ static std::map<const char*,uint64_t> _debug_bit_map;
uint64_t PBD::DEBUG::Stateful = PBD::new_debug_bit ("stateful");
uint64_t PBD::DEBUG::Properties = PBD::new_debug_bit ("properties");
uint64_t PBD::DEBUG::FileManager = PBD::new_debug_bit ("filemanager");
+uint64_t PBD::DEBUG::Pool = PBD::new_debug_bit ("pool");
uint64_t PBD::debug_bits = 0x0;
diff --git a/libs/pbd/pbd/debug.h b/libs/pbd/pbd/debug.h
index d3ce495a1b..8245b99b12 100644
--- a/libs/pbd/pbd/debug.h
+++ b/libs/pbd/pbd/debug.h
@@ -40,6 +40,7 @@ namespace PBD {
extern uint64_t Stateful;
extern uint64_t Properties;
extern uint64_t FileManager;
+ extern uint64_t Pool;
}
}
diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc
index c58f0d1071..8919f10f9a 100644
--- a/libs/pbd/pool.cc
+++ b/libs/pbd/pool.cc
@@ -26,6 +26,8 @@
#include "pbd/pool.h"
#include "pbd/error.h"
+#include "pbd/debug.h"
+#include "pbd/compose.h"
using namespace std;
using namespace PBD;
@@ -246,9 +248,10 @@ void*
CrossThreadPool::alloc ()
{
void* ptr;
- cerr << pthread_self() << ' ' << name() << " has " << pending.read_space() << " pending free entries waiting\n";
+
+ DEBUG_TRACE (DEBUG::Pool, string_compose ("%1 %2 has %3 pending free entries waiting\n", pthread_self(), name(), pending.read_space()));
while (pending.read (&ptr, 1) == 1) {
- cerr << pthread_self() << ' ' << name() << " pushes back a pending free list entry before allocating\n";
+ DEBUG_TRACE (DEBUG::Pool, string_compose ("%1 %2 pushes back a pending free list entry before allocating\n", pthread_self(), name()));
free_list.write (&ptr, 1);
}
return Pool::alloc ();