about summary refs log tree commit homepage
path: root/ioq.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-08-07 20:03:34 +0000
committerEric Wong <normalperson@yhbt.net>2013-08-26 20:41:08 +0000
commit37a5071021601480384c2abe20f2d33ad974579d (patch)
treeb0cc006c9cac9da7002e44adcfba2737bc0ce83f /ioq.c
parentfe1e1200c1541676e6b8402b7972a16105a76a63 (diff)
downloadcmogstored-37a5071021601480384c2abe20f2d33ad974579d.tar.gz
Our "all.stp" tapset now generates awk-friendly output for feeding
some sample awk scripts.

Using awk (and gawk) was necessary to avoid reimplementing strftime
in guru mode for generating CLF (Common Log Format) HTTP access logs.

Using awk also gives us several advantages:

* floating point number support (for time differences)

* a more familiar language to systems administrators
  (given this is for MogileFS, perhaps Perl would be even
   more familiar...).

* fast edit/run cycle, so the slowness of using stap to
  rebuild/reload the kernel module for all.stp changes can
  be avoided when output must be customized.
Diffstat (limited to 'ioq.c')
-rw-r--r--ioq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ioq.c b/ioq.c
index 339ef3d..78a9ba7 100644
--- a/ioq.c
+++ b/ioq.c
@@ -100,6 +100,7 @@ bool mog_ioq_ready(struct mog_ioq *ioq, struct mog_fd *mfd)
 
                 mog_ioq_current = ioq;
         } else {
+                TRACE(CMOGSTORED_IOQ_BLOCKED(mfd->fd));
                 mfd->ioq_blocked = 1;
                 SIMPLEQ_INSERT_TAIL(&ioq->ioq_head, mfd, ioqent);
                 ioq_set_contended(ioq);
@@ -213,6 +214,7 @@ bool mog_ioq_unblock(struct mog_fd *mfd)
         if (mfd->ioq_blocked == 0)
                 return false;
 
+        TRACE(CMOGSTORED_IOQ_UNBLOCKED(mfd->fd));
         mfd->ioq_blocked = 0;
         return true;
 }