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

Side by Side Diff: docs/memory-infra/adding_memory_infra_tracing.md

Issue 2494063002: Move memory docs to docs/memory-infra (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « docs/memory-infra/README.md ('k') | docs/memory-infra/heap_profiler.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Adding MemoryInfra Tracing to a Component 1 # Adding MemoryInfra Tracing to a Component
2 2
3 If you have a component that manages memory allocations, you should be 3 If you have a component that manages memory allocations, you should be
4 registering and tracking those allocations with Chrome's MemoryInfra system. 4 registering and tracking those allocations with Chrome's MemoryInfra system.
5 This lets you: 5 This lets you:
6 6
7 * See an overview of your allocations, giving insight into total size and 7 * See an overview of your allocations, giving insight into total size and
8 breakdown. 8 breakdown.
9 * Understand how your allocations change over time and how they are impacted by 9 * Understand how your allocations change over time and how they are impacted by
10 other parts of Chrome. 10 other parts of Chrome.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 Another advanced use case involves tracking sub-allocations of a larger 169 Another advanced use case involves tracking sub-allocations of a larger
170 allocation. For instance, this is used in 170 allocation. For instance, this is used in
171 [`gpu::gles2::TextureManager`][texture-manager] to dump both the suballocations 171 [`gpu::gles2::TextureManager`][texture-manager] to dump both the suballocations
172 which make up a texture. To create a suballocation, instead of calling 172 which make up a texture. To create a suballocation, instead of calling
173 [`ProcessMemoryDump::CreateAllocatorDump`][pmd] to create a 173 [`ProcessMemoryDump::CreateAllocatorDump`][pmd] to create a
174 [`MemoryAllocatorDump`][mem-alloc-dump], you call 174 [`MemoryAllocatorDump`][mem-alloc-dump], you call
175 [`ProcessMemoryDump::AddSubAllocation`][pmd], providing the ID of the parent 175 [`ProcessMemoryDump::AddSubAllocation`][pmd], providing the ID of the parent
176 allocation as the first parameter. 176 allocation as the first parameter.
177 177
178 [texture-manager]: https://chromium.googlesource.com/chromium/src/+/master/gpu/c ommand_buffer/service/texture_manager.cc 178 [texture-manager]: https://chromium.googlesource.com/chromium/src/+/master/gpu/c ommand_buffer/service/texture_manager.cc
OLDNEW
« no previous file with comments | « docs/memory-infra/README.md ('k') | docs/memory-infra/heap_profiler.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698