docs/memory: create describing tools that exist
First in a set of changes to the memory directory. The idea is to consolidate
some overview documentation for techniques and tools used, even if the
documentation does nothing more than name the tool or provide keywords for
a dev to start doing searches on.
The idea is to get some of the tribal knowledge down on paper.
Overall, the docs will focus on helping answer problems as opposed to
describing how things work.
Bug: 801006
Change-Id: I93c72cabfafdbd103eda64aa94791a23885663ae
Reviewed-on: https://chromium-review.googlesource.com/861197
Reviewed-by: Erik Chen <[email protected]>
Commit-Queue: Albert J. Wong <[email protected]>
Cr-Commit-Position: refs/heads/master@{#528691}
diff --git a/docs/memory/tools.md b/docs/memory/tools.md
new file mode 100644
index 0000000..7a744a9e
--- /dev/null
+++ b/docs/memory/tools.md
@@ -0,0 +1,20 @@
+# Description of Tools for developers trying to understand memory usage
+
+This page provides an overview of the tools available for examining memory usage
+in chrome.
+
+# Which tool should I use?
+
+No single tool can give a full view of memory usage in Chrome. There are too
+many different context involved (JS heap, DOM objects, native allocations, GPU,
+etc) that any tool that collected all that information likely would not be able
+to provide an actionable analysis. As such, here is a table of common area of
+inquiry and suggested tools for examining them.
+
+| Topic/Area of Inquiry | Tool(s) | What this is good for | Caveats |
+|----------|------------| ----------
+| Object allocation over time | `diff_heap_profiler.py` | Finding leaked C++ objects over time. |
+| Self-reported stats for resource usage per subsystem | chrome tracing with memory-infra | Gaining a global overview of which subsystems are using memory. |
+| Suspected Renderer DOM leaks | Real World Leak Detector | Finding leaks within the Renderer where C++ objects are refcounted using Oilpan |
+| Kernel/Drive Resource Usage | perfmon (win), ETW | Finding resource leaks that are not normally considered when the term "memory" is used. |
+| Blackbox examination of process memory | VMMAP (win) | Understanding fragmentation of the memory space |