projects
/
bluesky.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Track memory usage statistics for cached data.
[bluesky.git]
/
bluesky
/
debug.c
diff --git
a/bluesky/debug.c
b/bluesky/debug.c
index
023b99f
..
312a0e1
100644
(file)
--- a/
bluesky/debug.c
+++ b/
bluesky/debug.c
@@
-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);
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);
g_print("Cached inodes: %u\tNext inode: %"PRIu64"\n",
g_hash_table_size(fs->inodes), fs->next_inum);