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

Unified Diff: docs/memory-infra/probe-net.md

Issue 2949063002: Add documentation for //net MemoryDumpProvider (Closed)
Patch Set: self Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/memory-infra/probe-net.md
diff --git a/docs/memory-infra/probe-net.md b/docs/memory-infra/probe-net.md
new file mode 100644
index 0000000000000000000000000000000000000000..d86a9f868e80822c176ba329501f4f0e1a8a5716
--- /dev/null
+++ b/docs/memory-infra/probe-net.md
@@ -0,0 +1,79 @@
+# 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.
+
+ - QuicStreamFactory (“quic_stream_factory”)
+
+ 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
+
« 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