| OLD | NEW |
| 1 # Heap Profiling with MemoryInfra | 1 # Heap Profiling with MemoryInfra |
| 2 | 2 |
| 3 As of Chrome 48, MemoryInfra supports heap profiling. The core principle is | 3 As of Chrome 48, MemoryInfra supports heap profiling. The core principle is |
| 4 a solution that JustWorks™ on all platforms without patching or rebuilding, | 4 a solution that JustWorks™ on all platforms without patching or rebuilding, |
| 5 intergrated with the chrome://tracing ecosystem. | 5 intergrated with the chrome://tracing ecosystem. |
| 6 | 6 |
| 7 [TOC] | 7 [TOC] |
| 8 | 8 |
| 9 ## How to Use | 9 ## How to Use |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 4. In the analysis view, cells marked with a triple bar icon (☰) contain heap | 23 4. In the analysis view, cells marked with a triple bar icon (☰) contain heap |
| 24 dumps. Select such a cell. | 24 dumps. Select such a cell. |
| 25 | 25 |
| 26 ![Cells containing a heap dump][cells-heap-dump] | 26 ![Cells containing a heap dump][cells-heap-dump] |
| 27 | 27 |
| 28 5. Scroll down all the way to _Heap Details_. | 28 5. Scroll down all the way to _Heap Details_. |
| 29 | 29 |
| 30 6. Pinpoint the memory bug and live happily ever after. | 30 6. Pinpoint the memory bug and live happily ever after. |
| 31 | 31 |
| 32 [memory-infra]: memory_infra.md | 32 [memory-infra]: memory_infra.md |
| 33 [m-purple]: https://drive.google.com/uc?id=0Bx14iZPZRgb5RFFGc0xZZEJWVFk | 33 [m-purple]: https://storage.googleapis.com/chromium-docs.appspot.com/d7bd
f4d16204c293688be2e5a0bcb2bf463dbbc3 |
| 34 [cells-heap-dump]: https://drive.google.com/uc?id=0Bx14iZPZRgb5NGlJSFRONTFoWEU | 34 [cells-heap-dump]: https://storage.googleapis.com/chromium-docs.appspot.com/a24d
80d6a08da088e2e9c8b2b64daa215be4dacb |
| 35 | 35 |
| 36 ## Heap Details | 36 ## Heap Details |
| 37 | 37 |
| 38 The heap details view contains a tree that represents the heap. The size of the | 38 The heap details view contains a tree that represents the heap. The size of the |
| 39 root node corresponds to the selected allocator cell. | 39 root node corresponds to the selected allocator cell. |
| 40 | 40 |
| 41 *** aside | 41 *** aside |
| 42 The size value in the heap details view will not match the value in the selected | 42 The size value in the heap details view will not match the value in the selected |
| 43 analysis view cell exactly. There are three reasons for this. First, the heap | 43 analysis view cell exactly. There are three reasons for this. First, the heap |
| 44 profiler reports the memory that _the program requested_, whereas the allocator | 44 profiler reports the memory that _the program requested_, whereas the allocator |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 Heap dump diffs are fully supported by trace viewer. Select a heavy memory dump | 100 Heap dump diffs are fully supported by trace viewer. Select a heavy memory dump |
| 101 (a purple dot), then with the control key select a heavy memory dump earlier in | 101 (a purple dot), then with the control key select a heavy memory dump earlier in |
| 102 time. Below is a diff of theverge.com before and in the middle of loading ads. | 102 time. Below is a diff of theverge.com before and in the middle of loading ads. |
| 103 We can see that 4 MiB were allocated when parsing the documents in all those | 103 We can see that 4 MiB were allocated when parsing the documents in all those |
| 104 iframes, almost a megabyte of which was due to JavaScript. (Note that this is | 104 iframes, almost a megabyte of which was due to JavaScript. (Note that this is |
| 105 memory allocated by PartitionAlloc alone, the total renderer memory increase was | 105 memory allocated by PartitionAlloc alone, the total renderer memory increase was |
| 106 around 72 MiB.) | 106 around 72 MiB.) |
| 107 | 107 |
| 108 ![Diff of The Verge before and after loading ads][diff] | 108 ![Diff of The Verge before and after loading ads][diff] |
| 109 | 109 |
| 110 [pseudo-stack]: https://drive.google.com/uc?id=0Bx14iZPZRgb5M194Y2RqQ
jhoZkk | 110 [pseudo-stack]: https://storage.googleapis.com/chromium-docs.appspot.
com/058e50350836f55724e100d4dbbddf4b9803f550 |
| 111 [break-down-by-backtrace]: https://drive.google.com/uc?id=0Bx14iZPZRgb5ZDRQdGNnN
DNIazA | 111 [break-down-by-backtrace]: https://storage.googleapis.com/chromium-docs.appspot.
com/ec61c5f15705f5bcf3ca83a155ed647a0538bbe1 |
| 112 [break-down-by-type]: https://drive.google.com/uc?id=0Bx14iZPZRgb5THJMYlpyT
EN2Q2s | 112 [break-down-by-type]: https://storage.googleapis.com/chromium-docs.appspot.
com/2236e61021922c0813908c6745136953fa20a37b |
| 113 [type-then-backtrace]: https://drive.google.com/uc?id=0Bx14iZPZRgb5UGZFX1pDU
VpOLUU | 113 [type-then-backtrace]: https://storage.googleapis.com/chromium-docs.appspot.
com/c5367dde11476bdbf2d5a1c51674148915573d11 |
| 114 [diff]: https://drive.google.com/uc?id=0Bx14iZPZRgb5UzNvMmVOa
0RnQWs | 114 [diff]: https://storage.googleapis.com/chromium-docs.appspot.
com/802141906869cd533bb613da5f91bd0b071ceb24 |
| OLD | NEW |