Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: net/quic/core/quic_flow_controller.cc

Issue 2631613002: Revert of Add quic_logging (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_data_writer.h ('k') | net/quic/core/quic_framer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_flow_controller.cc
diff --git a/net/quic/core/quic_flow_controller.cc b/net/quic/core/quic_flow_controller.cc
index 976c0ff1d925883d9e84ce9c00be97aae3adf68d..676a88b900c2a2728a8753e09405a33057209bd7 100644
--- a/net/quic/core/quic_flow_controller.cc
+++ b/net/quic/core/quic_flow_controller.cc
@@ -9,7 +9,6 @@
#include "net/quic/core/quic_connection.h"
#include "net/quic/core/quic_packets.h"
#include "net/quic/platform/api/quic_bug_tracker.h"
-#include "net/quic/platform/api/quic_logging.h"
#include "net/quic/platform/api/quic_str_cat.h"
namespace net {
@@ -40,19 +39,17 @@
: kStreamReceiveWindowLimit;
DCHECK_LE(receive_window_size_, receive_window_size_limit_);
- QUIC_DVLOG(1) << ENDPOINT << "Created flow controller for stream " << id_
- << ", setting initial receive window offset to: "
- << receive_window_offset_
- << ", max receive window to: " << receive_window_size_
- << ", max receive window limit to: "
- << receive_window_size_limit_
- << ", setting send window offset to: " << send_window_offset_;
+ DVLOG(1) << ENDPOINT << "Created flow controller for stream " << id_
+ << ", setting initial receive window offset to: "
+ << receive_window_offset_
+ << ", max receive window to: " << receive_window_size_
+ << ", max receive window limit to: " << receive_window_size_limit_
+ << ", setting send window offset to: " << send_window_offset_;
}
void QuicFlowController::AddBytesConsumed(QuicByteCount bytes_consumed) {
bytes_consumed_ += bytes_consumed;
- QUIC_DVLOG(1) << ENDPOINT << "Stream " << id_
- << " consumed: " << bytes_consumed_;
+ DVLOG(1) << ENDPOINT << "Stream " << id_ << " consumed: " << bytes_consumed_;
MaybeSendWindowUpdate();
}
@@ -64,9 +61,9 @@
return false;
}
- QUIC_DVLOG(1) << ENDPOINT << "Stream " << id_
- << " highest byte offset increased from: "
- << highest_received_byte_offset_ << " to " << new_offset;
+ DVLOG(1) << ENDPOINT << "Stream " << id_
+ << " highest byte offset increased from: "
+ << highest_received_byte_offset_ << " to " << new_offset;
highest_received_byte_offset_ = new_offset;
return true;
}
@@ -88,15 +85,15 @@
}
bytes_sent_ += bytes_sent;
- QUIC_DVLOG(1) << ENDPOINT << "Stream " << id_ << " sent: " << bytes_sent_;
+ DVLOG(1) << ENDPOINT << "Stream " << id_ << " sent: " << bytes_sent_;
}
bool QuicFlowController::FlowControlViolation() {
if (highest_received_byte_offset_ > receive_window_offset_) {
- QUIC_DLOG(INFO) << ENDPOINT << "Flow control violation on stream " << id_
- << ", receive window offset: " << receive_window_offset_
- << ", highest received byte offset: "
- << highest_received_byte_offset_;
+ DVLOG(1) << ENDPOINT << "Flow control violation on stream " << id_
+ << ", receive window offset: " << receive_window_offset_
+ << ", highest received byte offset: "
+ << highest_received_byte_offset_;
return true;
}
return false;
@@ -116,7 +113,7 @@
QuicTime prev = prev_window_update_time_;
prev_window_update_time_ = now;
if (!prev.IsInitialized()) {
- QUIC_DVLOG(1) << ENDPOINT << "first window update for stream " << id_;
+ DVLOG(1) << ENDPOINT << "first window update for stream " << id_;
return;
}
@@ -128,7 +125,7 @@
QuicTime::Delta rtt =
connection_->sent_packet_manager().GetRttStats()->smoothed_rtt();
if (rtt.IsZero()) {
- QUIC_DVLOG(1) << ENDPOINT << "rtt zero for stream " << id_;
+ DVLOG(1) << ENDPOINT << "rtt zero for stream " << id_;
return;
}
@@ -148,16 +145,16 @@
std::min(receive_window_size_, receive_window_size_limit_);
if (receive_window_size_ > old_window) {
- QUIC_DVLOG(1) << ENDPOINT << "New max window increase for stream " << id_
- << " after " << since_last.ToMicroseconds()
- << " us, and RTT is " << rtt.ToMicroseconds()
- << "us. max wndw: " << receive_window_size_;
+ DVLOG(1) << ENDPOINT << "New max window increase for stream " << id_
+ << " after " << since_last.ToMicroseconds() << " us, and RTT is "
+ << rtt.ToMicroseconds()
+ << "us. max wndw: " << receive_window_size_;
} else {
// TODO(ckrasic) - add a varz to track this (?).
- QUIC_LOG_FIRST_N(INFO, 1) << ENDPOINT << "Max window at limit for stream "
- << id_ << " after " << since_last.ToMicroseconds()
- << " us, and RTT is " << rtt.ToMicroseconds()
- << "us. Limit size: " << receive_window_size_;
+ DVLOG(1) << ENDPOINT << "Max window at limit for stream " << id_
+ << " after " << since_last.ToMicroseconds() << " us, and RTT is "
+ << rtt.ToMicroseconds()
+ << "us. Limit size: " << receive_window_size_;
}
}
@@ -174,9 +171,9 @@
QuicByteCount threshold = WindowUpdateThreshold();
if (available_window >= threshold) {
- QUIC_DVLOG(1) << ENDPOINT << "Not sending WindowUpdate for stream " << id_
- << ", available window: " << available_window
- << " >= threshold: " << threshold;
+ DVLOG(1) << ENDPOINT << "Not sending WindowUpdate for stream " << id_
+ << ", available window: " << available_window
+ << " >= threshold: " << threshold;
return;
}
@@ -185,12 +182,12 @@
// Update our receive window.
receive_window_offset_ += (receive_window_size_ - available_window);
- QUIC_DVLOG(1) << ENDPOINT << "Sending WindowUpdate frame for stream " << id_
- << ", consumed bytes: " << bytes_consumed_
- << ", available window: " << available_window
- << ", and threshold: " << threshold
- << ", and receive window size: " << receive_window_size_
- << ". New receive window offset is: " << receive_window_offset_;
+ DVLOG(1) << ENDPOINT << "Sending WindowUpdate frame for stream " << id_
+ << ", consumed bytes: " << bytes_consumed_
+ << ", available window: " << available_window
+ << ", and threshold: " << threshold
+ << ", and receive window size: " << receive_window_size_
+ << ". New receive window offset is: " << receive_window_offset_;
// Inform the peer of our new receive window.
connection_->SendWindowUpdate(id_, receive_window_offset_);
@@ -199,11 +196,10 @@
void QuicFlowController::MaybeSendBlocked() {
if (SendWindowSize() == 0 &&
last_blocked_send_window_offset_ < send_window_offset_) {
- QUIC_DLOG(INFO) << ENDPOINT << "Stream " << id_
- << " is flow control blocked. "
- << "Send window: " << SendWindowSize()
- << ", bytes sent: " << bytes_sent_
- << ", send limit: " << send_window_offset_;
+ DVLOG(1) << ENDPOINT << "Stream " << id_ << " is flow control blocked. "
+ << "Send window: " << SendWindowSize()
+ << ", bytes sent: " << bytes_sent_
+ << ", send limit: " << send_window_offset_;
// The entire send_window has been consumed, we are now flow control
// blocked.
connection_->SendBlocked(id_);
@@ -221,10 +217,10 @@
return false;
}
- QUIC_DVLOG(1) << ENDPOINT << "UpdateSendWindowOffset for stream " << id_
- << " with new offset " << new_send_window_offset
- << " current offset: " << send_window_offset_
- << " bytes_sent: " << bytes_sent_;
+ DVLOG(1) << ENDPOINT << "UpdateSendWindowOffset for stream " << id_
+ << " with new offset " << new_send_window_offset
+ << " current offset: " << send_window_offset_
+ << " bytes_sent: " << bytes_sent_;
const bool blocked = IsBlocked();
send_window_offset_ = new_send_window_offset;
@@ -244,8 +240,8 @@
void QuicFlowController::UpdateReceiveWindowSize(QuicStreamOffset size) {
DCHECK_LE(size, receive_window_size_limit_);
- QUIC_DVLOG(1) << ENDPOINT << "UpdateReceiveWindowSize for stream " << id_
- << ": " << size;
+ DVLOG(1) << ENDPOINT << "UpdateReceiveWindowSize for stream " << id_ << ": "
+ << size;
if (receive_window_size_ != receive_window_offset_) {
QUIC_BUG << "receive_window_size_:" << receive_window_size_
<< " != receive_window_offset:" << receive_window_offset_;
« no previous file with comments | « net/quic/core/quic_data_writer.h ('k') | net/quic/core/quic_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698