Bug 1373103: log TCP read callback log message only if more then 5 callback are pending. r=mjf
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Wed, 14 Jun 2017 18:35:59 -0700
changeset 364165 fd642dab11dbc4d5031b6d92b519a06410992e3b
parent 364164 8a4350c371bbf9afe3a3c03ef345330203973d47
child 364166 29d5b5f6514cd950feb4b48c19df340b4192e43f
push id32034
push userkwierso@gmail.com
push dateThu, 15 Jun 2017 23:05:57 +0000
treeherdermozilla-central@2cdb9790628f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1373103
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1373103: log TCP read callback log message only if more then 5 callback are pending. r=mjf MozReview-Commit-ID: E0oAG89XGwg
media/mtransport/nr_socket_prsock.cpp
--- a/media/mtransport/nr_socket_prsock.cpp
+++ b/media/mtransport/nr_socket_prsock.cpp
@@ -2098,18 +2098,20 @@ void NrTcpSocketIpc::maybe_post_socket_r
         r_log(LOG_GENERIC, LOG_INFO, "Firing write callback (%u)",
               (uint32_t)buffered_bytes_);
         fire_callback(NR_ASYNC_WAIT_WRITE);
         has_event = true;
       }
     }
     if (poll_flags() & PR_POLL_READ) {
       if (msg_queue_.size()) {
-        r_log(LOG_GENERIC, LOG_INFO, "Firing read callback (%u)",
-              (uint32_t)msg_queue_.size());
+        if (msg_queue_.size() > 5) {
+          r_log(LOG_GENERIC, LOG_INFO, "Firing read callback (%u)",
+                (uint32_t)msg_queue_.size());
+        }
         fire_callback(NR_ASYNC_WAIT_READ);
         has_event = true;
       }
     }
   }
 
   // If any event has been posted, we post a runnable to see
   // if the events have to be posted again.