| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |