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

Issue 2665283003: Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. (Closed)

Created:
3 years, 10 months ago by xunjieli
Modified:
3 years, 10 months ago
Reviewers:
Bence, ssid, DmitrySkiba
CC:
chromium-reviews, cbentzel+watch_chromium.org, bnc+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve memory estimate of SpdySessionPool in net/ MemoryDumpProvider. This CL instruments other objects (e.g. buffers, queues, strings) referenced from SpdySessionPool and SpdySession. The goal is to make the memory estimate reported by SpdySessionPool::DumpMemoryStats() cover more parts of the code. However, there are still a couple of TODOs because base/trace_event/memory_usage_estimator.h doesn't yet support linked_hash_map, scoped_refptr and WeakPtr. BUG=669108 Review-Url: https://codereview.chromium.org/2665283003 Cr-Commit-Position: refs/heads/master@{#449431} Committed: https://chromium.googlesource.com/chromium/src/+/ec84e4ea604deb4d6cca4b72ce6f97babf99878b

Patch Set 1 #

Patch Set 2 #

Total comments: 9

Patch Set 3 : address bnc comments #

Total comments: 24

Patch Set 4 : Address Dmitry's comments #

Patch Set 5 : rebased #

Total comments: 6

Patch Set 6 : Address Bence comments #

Total comments: 8

Patch Set 7 : Rebased #

Patch Set 8 : address Dmitry's comments #

Patch Set 9 : Address two more comments #

Patch Set 10 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+311 lines, -15 lines) Patch
M net/base/host_port_pair.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M net/base/host_port_pair.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M net/http2/hpack/decoder/hpack_decoder_string_buffer.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M net/http2/hpack/decoder/hpack_decoder_string_buffer.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M net/http2/hpack/decoder/hpack_whole_entry_buffer.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/http2/hpack/decoder/hpack_whole_entry_buffer.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M net/http2/hpack/decoder/http2_hpack_decoder.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/http2/hpack/decoder/http2_hpack_decoder.cc View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M net/proxy/proxy_server.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/proxy/proxy_server.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M net/quic/chromium/quic_stream_factory.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M net/spdy/buffered_spdy_framer.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M net/spdy/buffered_spdy_framer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -0 lines 0 comments Download
M net/spdy/header_coalescer.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/header_coalescer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_decoder.h View 4 1 chunk +2 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_decoder.cc View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_decoder2.h View 4 1 chunk +1 line, -0 lines 0 comments Download
M net/spdy/hpack/hpack_decoder2.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_decoder3.h View 4 1 chunk +1 line, -0 lines 0 comments Download
M net/spdy/hpack/hpack_decoder3.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_decoder_interface.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_encoder.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_encoder.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_huffman_table.h View 1 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_huffman_table.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_output_stream.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_output_stream.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_static_table.h View 1 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/hpack/hpack_static_table.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M net/spdy/http2_frame_decoder_adapter.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M net/spdy/http2_priority_dependencies.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/http2_priority_dependencies.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M net/spdy/spdy_buffer.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_buffer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M net/spdy/spdy_buffer_producer.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M net/spdy/spdy_buffer_producer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M net/spdy/spdy_framer.h View 1 2 3 4 5 6 3 chunks +6 lines, -0 lines 0 comments Download
M net/spdy/spdy_framer.cc View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -0 lines 0 comments Download
M net/spdy/spdy_framer_decoder_adapter.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_framer_decoder_adapter.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M net/spdy/spdy_header_block.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_header_block.cc View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -0 lines 0 comments Download
M net/spdy/spdy_protocol.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_session.h View 1 2 3 4 4 chunks +10 lines, -2 lines 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 4 5 6 7 8 9 4 chunks +29 lines, -2 lines 0 comments Download
M net/spdy/spdy_session_key.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_session_key.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M net/spdy/spdy_session_pool.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -2 lines 0 comments Download
M net/spdy/spdy_stream.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/spdy/spdy_stream.cc View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -0 lines 0 comments Download
M net/spdy/spdy_write_queue.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M net/spdy/spdy_write_queue.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -0 lines 0 comments Download
M net/spdy/spdy_write_queue_unittest.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (35 generated)
xunjieli
Bence: With the upstream code in the mix, I am not sure if I can ...
3 years, 10 months ago (2017-02-01 22:13:43 UTC) #6
Bence
LGTM with nits and questions. https://codereview.chromium.org/2665283003/diff/40001/net/proxy/proxy_server.cc File net/proxy/proxy_server.cc (right): https://codereview.chromium.org/2665283003/diff/40001/net/proxy/proxy_server.cc#newcode213 net/proxy/proxy_server.cc:213: return HostPortPair::EstimateMemoryUsage(host_port_pair_); 1.It's just ...
3 years, 10 months ago (2017-02-02 14:15:19 UTC) #11
xunjieli
Dmitry and Sid: PTAL Is there a bug tracking the TODO of adding std::deque support ...
3 years, 10 months ago (2017-02-02 14:53:42 UTC) #14
Bence
Thank you. Still LGTM. https://codereview.chromium.org/2665283003/diff/40001/net/proxy/proxy_server.cc File net/proxy/proxy_server.cc (right): https://codereview.chromium.org/2665283003/diff/40001/net/proxy/proxy_server.cc#newcode213 net/proxy/proxy_server.cc:213: return HostPortPair::EstimateMemoryUsage(host_port_pair_); Ah okay, that ...
3 years, 10 months ago (2017-02-02 15:05:09 UTC) #15
DmitrySkiba
Overall comments: 1. I'll implement EMU for std::deque (and friends) ASAP. If you can hold ...
3 years, 10 months ago (2017-02-02 18:16:27 UTC) #16
xunjieli
Thanks, Dmitry! I've learned more about EMU today. The reason that I sometimes invoke the ...
3 years, 10 months ago (2017-02-02 18:58:40 UTC) #17
xunjieli
Thanks! I am unblocked and have uploaded a new patch. PTAL. https://codereview.chromium.org/2665283003/diff/60001/net/http2/hpack/decoder/hpack_whole_entry_buffer.cc File net/http2/hpack/decoder/hpack_whole_entry_buffer.cc (right): ...
3 years, 10 months ago (2017-02-03 22:25:10 UTC) #21
Bence
LGTM with nits. https://codereview.chromium.org/2665283003/diff/100001/net/http2/hpack/decoder/http2_hpack_decoder.cc File net/http2/hpack/decoder/http2_hpack_decoder.cc (right): https://codereview.chromium.org/2665283003/diff/100001/net/http2/hpack/decoder/http2_hpack_decoder.cc#newcode120 net/http2/hpack/decoder/http2_hpack_decoder.cc:120: return entry_buffer_.EstimateMemoryUsage(); I thought EstimateMemoryUsage(entry_buffer_) is ...
3 years, 10 months ago (2017-02-05 19:11:23 UTC) #31
xunjieli
Thanks! Dmitry and Sid: PTAL. https://codereview.chromium.org/2665283003/diff/100001/net/http2/hpack/decoder/http2_hpack_decoder.cc File net/http2/hpack/decoder/http2_hpack_decoder.cc (right): https://codereview.chromium.org/2665283003/diff/100001/net/http2/hpack/decoder/http2_hpack_decoder.cc#newcode120 net/http2/hpack/decoder/http2_hpack_decoder.cc:120: return entry_buffer_.EstimateMemoryUsage(); On 2017/02/05 ...
3 years, 10 months ago (2017-02-06 14:54:56 UTC) #34
DmitrySkiba
Almost there! Thanks for working on this! https://codereview.chromium.org/2665283003/diff/120001/net/spdy/hpack/hpack_decoder.cc File net/spdy/hpack/hpack_decoder.cc (right): https://codereview.chromium.org/2665283003/diff/120001/net/spdy/hpack/hpack_decoder.cc#newcode121 net/spdy/hpack/hpack_decoder.cc:121: return header_table_.size() ...
3 years, 10 months ago (2017-02-06 18:02:34 UTC) #37
Bence
https://codereview.chromium.org/2665283003/diff/120001/net/spdy/spdy_protocol.h File net/spdy/spdy_protocol.h (right): https://codereview.chromium.org/2665283003/diff/120001/net/spdy/spdy_protocol.h#newcode863 net/spdy/spdy_protocol.h:863: if (owns_buffer_) Optional: if you think it is easier ...
3 years, 10 months ago (2017-02-08 14:46:46 UTC) #38
xunjieli
Thanks! PTAL https://codereview.chromium.org/2665283003/diff/120001/net/spdy/hpack/hpack_decoder.cc File net/spdy/hpack/hpack_decoder.cc (right): https://codereview.chromium.org/2665283003/diff/120001/net/spdy/hpack/hpack_decoder.cc#newcode121 net/spdy/hpack/hpack_decoder.cc:121: return header_table_.size() + On 2017/02/06 18:02:34, DmitrySkiba ...
3 years, 10 months ago (2017-02-08 15:42:50 UTC) #40
DmitrySkiba
LGTM!
3 years, 10 months ago (2017-02-08 16:38:23 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2665283003/200001
3 years, 10 months ago (2017-02-09 20:40:53 UTC) #47
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 22:05:00 UTC) #50
Message was sent while issue was closed.
Committed patchset #10 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/ec84e4ea604deb4d6cca4b72ce6f...

Powered by Google App Engine
This is Rietveld 408576698