Track memory usage statistics for cached data.
[bluesky.git] / bluesky / debug.c
index 023b99f..312a0e1 100644 (file)
@@ -39,6 +39,9 @@ static void inode_dump(gpointer key, gpointer value, gpointer user_data)
 void bluesky_debug_dump(BlueSkyFS *fs)
 {
     g_print("*** DEBUG DUMP FOR FILESYSTEM %s ***\n", fs->name);
+    g_print("Cached blocks: %d\tDirty blocks: %d\n",
+            g_atomic_int_get(&fs->cache_total),
+            g_atomic_int_get(&fs->cache_dirty));
     g_print("Cached inodes: %u\tNext inode: %"PRIu64"\n",
             g_hash_table_size(fs->inodes), fs->next_inum);