trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [1/2] git commit: Log the number of directory bytes allocated
Date Fri, 19 Oct 2012 05:17:34 GMT
Updated Branches:
  refs/heads/master 3d9926a69 -> 338c00f3c


Log the number of directory bytes allocated


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/338c00f3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/338c00f3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/338c00f3

Branch: refs/heads/master
Commit: 338c00f3c2c8a3bad219e8e4bab985122b93dd27
Parents: 72ee5e0
Author: James Peach <jpeach@apache.org>
Authored: Thu Oct 18 22:17:14 2012 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Thu Oct 18 22:17:14 2012 -0700

----------------------------------------------------------------------
 iocore/cache/Cache.cc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/338c00f3/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 4aa4da6..6f7676c 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -1074,6 +1074,8 @@ Vol::init(char *s, off_t blocks, off_t dir_skip, bool clear)
   evacuate = (DLL<EvacuationBlock> *)ats_malloc(evac_len);
   memset(evacuate, 0, evac_len);
 
+  Debug("cache_init", "allocating %zu directory bytes for a %zu byte volume (%lf%%)",
+    vol_dirlen(this), this->len, (double)vol_dirlen(this) / (double)this->len * 100.0);
   raw_dir = (char *)ats_memalign(sysconf(_SC_PAGESIZE), vol_dirlen(this));
   dir = (Dir *) (raw_dir + vol_headerlen(this));
   header = (VolHeaderFooter *) raw_dir;


Mime
View raw message