diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-08-07 20:03:34 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-08-26 20:41:08 +0000 |
commit | 37a5071021601480384c2abe20f2d33ad974579d (patch) | |
tree | b0cc006c9cac9da7002e44adcfba2737bc0ce83f /trywrite.c | |
parent | fe1e1200c1541676e6b8402b7972a16105a76a63 (diff) | |
download | cmogstored-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 'trywrite.c')
-rw-r--r-- | trywrite.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -98,7 +98,7 @@ retry: } else if (w <= 0) { switch (errno) { case_EAGAIN: - TRACE(CMOGSTORED_WRITE_BUFFERED()); + TRACE(CMOGSTORED_WRITE_BUFFERED(fd, len)); return wbuf_newv(len, iov, iovcnt); case EINTR: goto retry; case 0: sysbug("writev", w); @@ -165,7 +165,7 @@ void * mog_trysend(int fd, void *buf, size_t len, off_t more) */ switch (errno) { case_EAGAIN: - TRACE(CMOGSTORED_WRITE_BUFFERED()); + TRACE(CMOGSTORED_WRITE_BUFFERED(fd, len)); return wbuf_new(buf, len); case EINTR: continue; case 0: sysbug("send", w); |