bug 769264 pipeline logging cleanups r=honzab
authorPatrick McManus <mcmanus@ducksong.com>
Mon, 02 Jul 2012 18:10:04 -0400
changeset 100854 fae2698d6ac6c2612f5f3eda478f8bb16030324f
parent 100848 d3a3e58db83ddc077a9d2568617369985be05aca
child 100855 2777ec78a2b5dc77e18eed0e4001bc699344405c
push idunknown
push userunknown
push dateunknown
reviewershonzab
bugs769264
milestone16.0a1
bug 769264 pipeline logging cleanups r=honzab
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpConnectionMgr.cpp
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -962,34 +962,33 @@ nsHttpConnection::ReadTimeoutTick(PRInte
     // not get called at all, however OSR discovers them with lower latency
     // if the issue is just very slow (but not stalled) reading.
     //
     // Right now we only take action if pipelining is involved, but this would
     // be the place to add general read timeout handling if it is desired.
 
     PRUint32 pipelineDepth = mTransaction->PipelineDepth();
 
-    if (delta >= gHttpHandler->GetPipelineRescheduleTimeout()) {
+    if (delta >= gHttpHandler->GetPipelineRescheduleTimeout() &&
+        pipelineDepth > 1) {
 
         // this just reschedules blocked transactions. no transaction
         // is aborted completely.
         LOG(("cancelling pipeline due to a %ums stall - depth %d\n",
              PR_IntervalToMilliseconds(delta), pipelineDepth));
 
-        if (pipelineDepth > 1) {
-            nsHttpPipeline *pipeline = mTransaction->QueryPipeline();
-            NS_ABORT_IF_FALSE(pipeline, "pipelinedepth > 1 without pipeline");
-            // code this defensively for the moment and check for null in opt build
-            // This will reschedule blocked members of the pipeline, but the
-            // blocking transaction (i.e. response 0) will not be changed.
-            if (pipeline) {
-                pipeline->CancelPipeline(NS_ERROR_NET_TIMEOUT);
-                LOG(("Rescheduling the head of line blocked members of a pipeline "
-                     "because reschedule-timeout idle interval exceeded"));
-            }
+        nsHttpPipeline *pipeline = mTransaction->QueryPipeline();
+        NS_ABORT_IF_FALSE(pipeline, "pipelinedepth > 1 without pipeline");
+        // code this defensively for the moment and check for null in opt build
+        // This will reschedule blocked members of the pipeline, but the
+        // blocking transaction (i.e. response 0) will not be changed.
+        if (pipeline) {
+            pipeline->CancelPipeline(NS_ERROR_NET_TIMEOUT);
+            LOG(("Rescheduling the head of line blocked members of a pipeline "
+                 "because reschedule-timeout idle interval exceeded"));
         }
     }
 
     if (delta < gHttpHandler->GetPipelineTimeout())
         return;
 
     if (pipelineDepth <= 1 && !mTransaction->PipelinePosition())
         return;
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -2856,17 +2856,17 @@ nsConnectionEntry::OnPipelineFeedbackInf
         if (info & kPipelineInfoTypeBad)
             mYellowBadEvents++;
         else if (info & (kPipelineInfoTypeNeutral | kPipelineInfoTypeGood))
             mYellowGoodEvents++;
     }
     
     if (mPipelineState == PS_GREEN && info == GoodCompletedOK) {
         PRInt32 depth = data;
-        LOG(("Transaction completed at pipeline depty of %d. Host = %s\n",
+        LOG(("Transaction completed at pipeline depth of %d. Host = %s\n",
              depth, mConnInfo->Host()));
 
         if (depth >= 3)
             mGreenDepth = kPipelineUnlimited;
     }
 
     nsAHttpTransaction::Classifier classification;
     if (conn)