cogl-debug: add instrumentation to track the number of objects

This allows to track the number of objects allocated by Cogl. The
results are displayed on the standard output by calling :

cogl_debug_print_instances ();

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
Signed-off-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Lionel Landwerlin
2011-06-10 18:44:09 +01:00
committed by Neil Roberts
parent c603dc67ca
commit 5dc42284a5
5 changed files with 185 additions and 45 deletions

View File

@ -84,6 +84,7 @@ static const int n_cogl_behavioural_debug_keys =
G_N_ELEMENTS (cogl_behavioural_debug_keys);
unsigned int _cogl_debug_flags[COGL_DEBUG_N_INTS];
GHashTable *_cogl_debug_instances;
static void
_cogl_parse_debug_string_for_keys (const char *value,