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

Side by Side Diff: net/quic/quic_unacked_packet_map.cc

Issue 179773007: These LOG(INFO)s claimed 8-9% of time under a load test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_unacked_packet_map.h" 5 #include "net/quic/quic_unacked_packet_map.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/quic/quic_connection_stats.h" 9 #include "net/quic/quic_connection_stats.h"
10 #include "net/quic/quic_utils_chromium.h" 10 #include "net/quic/quic_utils_chromium.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 LOG(DFATAL) << "NackPacket called for packet that is not unacked: " 149 LOG(DFATAL) << "NackPacket called for packet that is not unacked: "
150 << sequence_number; 150 << sequence_number;
151 return; 151 return;
152 } 152 }
153 153
154 it->second.nack_count = max(min_nacks, it->second.nack_count + 1); 154 it->second.nack_count = max(min_nacks, it->second.nack_count + 1);
155 } 155 }
156 156
157 void QuicUnackedPacketMap::RemovePacket( 157 void QuicUnackedPacketMap::RemovePacket(
158 QuicPacketSequenceNumber sequence_number) { 158 QuicPacketSequenceNumber sequence_number) {
159 DVLOG(1) << __FUNCTION__ << " " << sequence_number;
160 UnackedPacketMap::iterator it = unacked_packets_.find(sequence_number); 159 UnackedPacketMap::iterator it = unacked_packets_.find(sequence_number);
161 if (it == unacked_packets_.end()) { 160 if (it == unacked_packets_.end()) {
162 LOG(DFATAL) << "packet is not unacked: " << sequence_number; 161 LOG(DFATAL) << "packet is not unacked: " << sequence_number;
163 return; 162 return;
164 } 163 }
165 const TransmissionInfo& transmission_info = it->second; 164 const TransmissionInfo& transmission_info = it->second;
166 transmission_info.all_transmissions->erase(sequence_number); 165 transmission_info.all_transmissions->erase(sequence_number);
167 if (transmission_info.all_transmissions->empty()) { 166 if (transmission_info.all_transmissions->empty()) {
168 delete transmission_info.all_transmissions; 167 delete transmission_info.all_transmissions;
169 } 168 }
170 if (transmission_info.retransmittable_frames != NULL) { 169 if (transmission_info.retransmittable_frames != NULL) {
171 delete transmission_info.retransmittable_frames; 170 delete transmission_info.retransmittable_frames;
172 } 171 }
173 unacked_packets_.erase(it); 172 unacked_packets_.erase(it);
174 } 173 }
175 174
176 void QuicUnackedPacketMap::NeuterPacket( 175 void QuicUnackedPacketMap::NeuterPacket(
177 QuicPacketSequenceNumber sequence_number) { 176 QuicPacketSequenceNumber sequence_number) {
178 DVLOG(1) << __FUNCTION__ << " " << sequence_number << " pending? "
179 << unacked_packets_[sequence_number].pending;
180 UnackedPacketMap::iterator it = unacked_packets_.find(sequence_number); 177 UnackedPacketMap::iterator it = unacked_packets_.find(sequence_number);
181 if (it == unacked_packets_.end()) { 178 if (it == unacked_packets_.end()) {
182 LOG(DFATAL) << "packet is not unacked: " << sequence_number; 179 LOG(DFATAL) << "packet is not unacked: " << sequence_number;
183 return; 180 return;
184 } 181 }
185 TransmissionInfo* transmission_info = &it->second; 182 TransmissionInfo* transmission_info = &it->second;
186 if (transmission_info->all_transmissions->size() > 1) { 183 if (transmission_info->all_transmissions->size() > 1) {
187 transmission_info->all_transmissions->erase(sequence_number); 184 transmission_info->all_transmissions->erase(sequence_number);
188 transmission_info->all_transmissions = new SequenceNumberSet(); 185 transmission_info->all_transmissions = new SequenceNumberSet();
189 transmission_info->all_transmissions->insert(sequence_number); 186 transmission_info->all_transmissions->insert(sequence_number);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 DCHECK(!it->second.pending); 330 DCHECK(!it->second.pending);
334 331
335 largest_sent_packet_ = max(sequence_number, largest_sent_packet_); 332 largest_sent_packet_ = max(sequence_number, largest_sent_packet_);
336 bytes_in_flight_ += bytes_sent; 333 bytes_in_flight_ += bytes_sent;
337 it->second.sent_time = sent_time; 334 it->second.sent_time = sent_time;
338 it->second.bytes_sent = bytes_sent; 335 it->second.bytes_sent = bytes_sent;
339 it->second.pending = true; 336 it->second.pending = true;
340 } 337 }
341 338
342 } // namespace net 339 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698