
This class used to create QUIC streams, but now creates and pools QUIC sessions instead. This rename brings it in line with SpdySessionPool and its `RequestSession` method. This CL has no functional impact. It is a mechanistic rename, performed with `sed`. It avoids renaming existing metrics, preferring continuity of data over accuracy of the name. ``` sed -i 's/quic_stream_factory/quic_session_pool/g;s/QUIC_STREAM_FACTORY/QUIC_SESSION_POOL/g;s/QuicStreamFactory/QuicSessionPool/g' $(git grep -il 'quic.\?stream.\?factory') sed -i 's/quic_stream_request/quic_session_request/g;s/QUIC_STREAM_REQUEST/QUIC_SESSION_REQUEST/g;s/QuicStreamRequest/QuicSessionRequest/g' $(git grep -il 'quic.\?stream.\?request') for f in net/quic/*quic_stream_factory*; do n=$(echo $f | sed -e s/stream/session/g); git mv $f $n; done sed -i 's/Net\.QuicSessionPool/Net.QuicStreamFactory/g' $(git grep -il 'Net.QuicSession' net/ tools/) git cl format ``` Change-Id: I20ceb3d8a0a97cd9c8888bb7414b983b9fe5fa51 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5190439 Reviewed-by: Ryan Hamilton <rch@chromium.org> Commit-Queue: Dustin Mitchell <djmitche@chromium.org> Reviewed-by: Elly FJ <ellyjones@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Reviewed-by: Paul Semel <paulsemel@chromium.org> Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org> Reviewed-by: Matt Menke <mmenke@chromium.org> Reviewed-by: David Schinazi <dschinazi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1248827}
80 lines
2.8 KiB
Markdown
80 lines
2.8 KiB
Markdown
# Network Stack Memory Tracing
|
||
|
||
This is an overview of the Net column in [MemoryInfra][memory-infra].
|
||
|
||
[TOC]
|
||
|
||
## Quick Start
|
||
|
||
To get an overview of total network stack memory usage, select the Browser
|
||
process' *net* category and look at *effective_size* or *size* column.
|
||
|
||
![net stack column][net-stack-column]
|
||
|
||
[memory-infra]: README.md
|
||
[net-stack-column]: https://storage.googleapis.com/chromium-docs.appspot.com/net_category.png
|
||
|
||
## Detailed Information
|
||
|
||
The numbers are reported by the network stack’s MemoryDumpProvider, which is
|
||
implemented by URLRequestContext class. URLRequestContext calls into major
|
||
network stack objects (such as HttpNetworkSession, SSLClientSessionCache,
|
||
HttpCache) to aggregate memory usage numbers. The total number reported in
|
||
“net” is a lower bound of the memory used by the network stack. It is not
|
||
intended to be an accurate measurement. Please use
|
||
[heap profiler][heap-profiler] instead to see all allocations.
|
||
|
||
**URLRequestContext** (“url_request_context”)
|
||
|
||
This is a top-level network stack object used to create url requests. There are
|
||
several URLRequestContexts in Chrome. See
|
||
[Anatomy of the Network Stack][anatomy-of-network-stack] for what these
|
||
URLRequestContexts are created for. The number of URLRequestContexts increases
|
||
with the number of profiles.
|
||
|
||
For a “url_request_context” row, the “object_count” column indicates the number
|
||
of live URLRequests created by that context.
|
||
|
||
+ Sub rows
|
||
|
||
- HttpCache (“http_cache”)
|
||
|
||
This cache can be a disk cache (backed by either block file or simple
|
||
cache backend) or an in-memory cache. An incognito profile, for example,
|
||
has an in-memory HttpCache. You can tell this by whether
|
||
*mem_backend_size* column is present for that particular
|
||
URLRequestContext.
|
||
|
||
|
||
**HttpNetworkSession** (“http_network_session”)
|
||
|
||
This network stack object owns socket pools, the HTTP/2 and QUIC session pools.
|
||
There is usually a 1:1 correspondence from a URLRequestContext to an
|
||
HttpNetworkSession, but there are exceptions. For example, the “main”
|
||
URLRequestContext shares the same HttpNetworkSession with “main_media”
|
||
URLRequestContext and “main_isolated_media” URLRequestContext.
|
||
|
||
+ Sub rows
|
||
|
||
- HttpStreamFactory(“stream_factory”)
|
||
|
||
This object is an entry to establish HTTP/1.1, HTTP/2 and QUIC
|
||
connections.
|
||
|
||
- SpdySessionPool (“spdy_session_pool”)
|
||
|
||
This object owns HTTP/2 sessions.
|
||
|
||
- QuicSessionPool (“quic_session_pool”)
|
||
|
||
This object owns QUIC sessions and streams.
|
||
|
||
**SSLClientSessionCache** (“ssl_session_cache”)
|
||
|
||
This is a global singleton that caches SSL session objects which retain
|
||
references to refcounted SSL Certificates.
|
||
|
||
[heap-profiler]: /docs/memory-infra/heap_profiler.md
|
||
[anatomy-of-network-stack]: /net/docs/life-of-a-url-request.md
|
||
|