Chromium Code Reviews| Index: docs/memory-infra/heap_profiler.md |
| diff --git a/docs/memory-infra/heap_profiler.md b/docs/memory-infra/heap_profiler.md |
| index 0910b641bf2ab9b2e67b123158964e99f3232f57..35c42007402dd3440d9de739217ba88473100b3f 100644 |
| --- a/docs/memory-infra/heap_profiler.md |
| +++ b/docs/memory-infra/heap_profiler.md |
| @@ -38,20 +38,42 @@ integrated with the chrome://tracing ecosystem. |
| By default heap profiling collects pseudo allocation traces, which are based |
| on trace events. I.e. frames in allocation traces correspond to trace events |
| that were active at the time of allocations, and are not real function names. |
| -However, you can build a special Linux / Android build that will collect |
| -real C/C++ stack traces. |
| +It's also possible to use heap profiling with native, symbolized stack traces. |
|
awong
2017/06/22 21:43:51
Add a note that it's for official builds.
erikchen
2017/06/22 21:55:56
Renamed the sections below to distinguish between
|
| + |
| +#### Native stack traces (macOS/Windows) |
| + |
| +1. Navigate to chrome://flags, and set "enable-heap-profiling" to Enabled |
| + (native mode). |
| + |
| +2. Use the [TraceOnTap][extension-link] extension to grab a trace. |
| + |
| +3. Run the following script to symbolize the trace. |
| + |
| + third_party/catapult/tracing/bin/symbolize_trace <trace file> |
| + |
| +4. Load the trace file in `chrome://tracing`. Locate a purple ![M][m-purple] |
| + dot, and continue from step *3* from the instructions above. Native stack |
| + traces will be shown in the _Heap Details_ pane. |
| + |
| +[extension-link]: https://cs.chromium.org/chromium/src/third_party/catapult/experimental/trace_on_tap/?q=traceontap+package:%5Echromium$&dr=CSs |
| + |
| +#### Native stack traces (Android/Linux) |
| + |
| +On Linux / Android, you need to build Chromium with special flags to use native |
| +heap profiling. |
| 1. Build with the following GN flags: |
| Linux |
| - enable_profiling = true |
|
DmitrySkiba
2017/06/22 21:44:32
Why are you removing this? Without enable_profilin
erikchen
2017/06/22 21:55:55
See very long discussion on https://bugs.chromium.
|
| + symbol_level = 1 |
|
awong
2017/06/22 21:43:51
Move the `symbol_level` change into a note or sect
erikchen
2017/06/22 21:55:56
Add comments for macOS / Windows w.r.t. symbol_lev
|
| Android |
| arm_use_thumb = false |
| enable_profiling = true |
| + symbol_level = 1 |
| 2. Start Chrome with `--enable-heap-profiling=native` switch (notice |
| `=native` part). |