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

Unified Diff: docs/memory-infra/heap_profiler.md

Issue 2949353004: Update documentation of memory-infra to describe updates to heap profiling. (Closed)
Patch Set: Created 3 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0c874702075172339e9461d82fa34d6ed90957b1 100644
--- a/docs/memory-infra/heap_profiler.md
+++ b/docs/memory-infra/heap_profiler.md
@@ -38,8 +38,29 @@ 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.
+
+#### 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
awong 2017/06/22 21:25:48 You don't need this on Linux... That just turns on
erikchen 2017/06/22 21:35:40 ah, but we don't have symbolization for Linux...Up
+heap profiling.
1. Build with the following GN flags:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698