Repository: trafficserver
Updated Branches:
  refs/heads/master 37f0fd013 -> e89dc276f


TS-3330: Several broken stats


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

Branch: refs/heads/master
Commit: bf213732cf98ccf1b53750e3fdc57230144c1e41
Parents: 9a9c451
Author: Brian Geffon <bri...@apache.org>
Authored: Tue Jan 27 11:23:21 2015 -0800
Committer: Brian Geffon <bri...@apache.org>
Committed: Tue Jan 27 11:23:21 2015 -0800

----------------------------------------------------------------------
 iocore/net/P_Net.h               |  3 ---
 iocore/net/SSLNetVConnection.cc  |  6 +++---
 iocore/net/UnixNetVConnection.cc | 13 +++++++------
 3 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bf213732/iocore/net/P_Net.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_Net.h b/iocore/net/P_Net.h
index 8dfa309..cb838f3 100644
--- a/iocore/net/P_Net.h
+++ b/iocore/net/P_Net.h
@@ -63,9 +63,6 @@ extern RecRawStatBlock *net_rsb;
 #define SSL_HANDSHAKE_WANT_ACCEPT 8
 #define SSL_HANDSHAKE_WANT_CONNECT 9
 
-#define NET_DEBUG_COUNT_DYN_STAT(_x, _y) \
-RecIncrRawStatCount(net_rsb, mutex->thread_holding, (int)_x, _y)
-
 #define NET_INCREMENT_DYN_STAT(_x)  \
 RecIncrRawStatSum(net_rsb, mutex->thread_holding, (int)_x, 1)
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bf213732/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 91ae8e7..235257a 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -328,7 +328,7 @@ SSLNetVConnection::read_raw_data()
       } else {
         r = socketManager.readv(this->con.fd, &tiovec[0], niov);
       }
-      NET_DEBUG_COUNT_DYN_STAT(net_calls_to_read_stat, 1);
+      NET_INCREMENT_DYN_STAT(net_calls_to_read_stat);
       total_read += rattempted;
     } while (rattempted && r == rattempted && total_read < toread);
 
@@ -343,7 +343,7 @@ SSLNetVConnection::read_raw_data()
     if (r <= 0) {
 
       if (r == -EAGAIN || r == -ENOTCONN) {
-        NET_DEBUG_COUNT_DYN_STAT(net_calls_to_read_nodata_stat, 1);
+        NET_INCREMENT_DYN_STAT(net_calls_to_read_nodata_stat);
         return r;
       }
 
@@ -702,7 +702,7 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, 
int64_t &wattempted, i
     }
 
     Debug("ssl", "SSLNetVConnection::loadBufferAndCallWrite,Number of bytes 
written=%" PRId64" , total=%" PRId64"", r, total_written);
-    NET_DEBUG_COUNT_DYN_STAT(net_calls_to_write_stat, 1);
+    NET_INCREMENT_DYN_STAT(net_calls_to_write_stat);
   } while (r == l && total_written < towrite && b);
 
   if (r > 0) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bf213732/iocore/net/UnixNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 0319c8e..873751b 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -268,7 +268,7 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, 
EThread *thread)
       } else {
         r = socketManager.readv(vc->con.fd, &tiovec[0], niov);
       }
-      NET_DEBUG_COUNT_DYN_STAT(net_calls_to_read_stat, 1);
+      NET_INCREMENT_DYN_STAT(net_calls_to_read_stat);
       total_read += rattempted;
     } while (rattempted && r == rattempted && total_read < toread);
 
@@ -283,7 +283,7 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, 
EThread *thread)
     if (r <= 0) {
 
       if (r == -EAGAIN || r == -ENOTCONN) {
-        NET_DEBUG_COUNT_DYN_STAT(net_calls_to_read_nodata_stat, 1);
+        NET_INCREMENT_DYN_STAT(net_calls_to_read_nodata_stat);
         vc->read.triggered = 0;
         nh->read_ready_list.remove(vc);
         return;
@@ -349,8 +349,9 @@ write_to_net(NetHandler *nh, UnixNetVConnection *vc, 
EThread *thread)
 {
   ProxyMutex *mutex = thread->mutex;
 
-  NET_DEBUG_COUNT_DYN_STAT(net_calls_to_writetonet_stat, 1);
-  NET_DEBUG_COUNT_DYN_STAT(net_calls_to_writetonet_afterpoll_stat, 1);
+  NET_INCREMENT_DYN_STAT(net_calls_to_writetonet_stat);
+  NET_INCREMENT_DYN_STAT(net_calls_to_writetonet_afterpoll_stat);
+
 
   write_to_net_io(nh, vc, thread);
 }
@@ -458,7 +459,7 @@ write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, 
EThread *thread)
   // check for errors
   if (r <= 0) {                 // if the socket was not ready,add to WaitList
     if (r == -EAGAIN || r == -ENOTCONN) {
-      NET_DEBUG_COUNT_DYN_STAT(net_calls_to_write_nodata_stat, 1);
+      NET_INCREMENT_DYN_STAT(net_calls_to_write_nodata_stat);
       if((needs & EVENTIO_WRITE) == EVENTIO_WRITE) {
         vc->write.triggered = 0;
         nh->write_ready_list.remove(vc);
@@ -898,7 +899,7 @@ UnixNetVConnection::load_buffer_and_write(int64_t towrite, 
int64_t &wattempted,
     else
       r = socketManager.writev(con.fd, &tiovec[0], niov);
     ProxyMutex *mutex = thread->mutex;
-    NET_DEBUG_COUNT_DYN_STAT(net_calls_to_write_stat, 1);
+    NET_INCREMENT_DYN_STAT(net_calls_to_write_stat);
   } while (r == wattempted && total_written < towrite);
 
   needs |= EVENTIO_WRITE;

Reply via email to