chiark / gitweb /
journald: keep statistics on how of we hit/miss the mmap cache
[elogind.git] / src / journal / sd-journal.c
index 4579e9ee2dedcf532d34b0e382717e79f784eed5..1c91f007b79bff96f56ed47d891190e5fd751197 100644 (file)
@@ -1831,8 +1831,10 @@ _public_ void sd_journal_close(sd_journal *j) {
         if (j->inotify_fd >= 0)
                 close_nointr_nofail(j->inotify_fd);
 
-        if (j->mmap)
+        if (j->mmap) {
+                log_debug("mmap cache statistics: %u hit, %u miss", mmap_cache_get_hit(j->mmap), mmap_cache_get_missed(j->mmap));
                 mmap_cache_unref(j->mmap);
+        }
 
         free(j->path);
         free(j->unique_field);