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

Side by Side Diff: components/tracing/docs/memory_infra_startup_tracing.md

Issue 1688043004: [docs] Document MemoryInfra startup tracing on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Primiano's comments Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Startup Tracing with MemoryInfra 1 # Startup Tracing with MemoryInfra
2 2
3 [MemoryInfra](memory_infra.md) supports startup tracing. 3 [MemoryInfra](memory_infra.md) supports startup tracing.
4 4
5 ## The Simple Way 5 ## The Simple Way
6 6
7 Start Chrome as follows: 7 Start Chrome as follows:
8 8
9 $ chrome --no-sandbox \ 9 $ chrome --no-sandbox \
10 --trace-startup=-*,disabled-by-default-memory-infra \ 10 --trace-startup=-*,disabled-by-default-memory-infra \
11 --trace-startup-file=/tmp/trace.json \ 11 --trace-startup-file=/tmp/trace.json \
12 --trace-startup-duration=7 12 --trace-startup-duration=7
13 13
14 On Android, enable startup tracing and start Chrome as follows:
15
16 $ build/android/adb_chrome_public_command_line \
17 --trace-startup=-*,disabled-by-default-memory-infra \
18 --trace-startup-file=/sdcard/Download/trace.json \
19 --trace-startup-duration=7
20
21 $ build/android/adb_run_chrome_public
22
23 $ adb pull /sdcard/Download/trace.json # After tracing.
24
25 Note that startup tracing will be enabled upon every Chrome launch until you
petrcermak 2016/02/11 12:20:49 I realized that I should add the note about disabl
26 delete the command-line flags:
27
28 $ build/android/adb_chrome_public_command_line ""
29
14 This will use the default configuration: one memory dump every 250 ms with a 30 This will use the default configuration: one memory dump every 250 ms with a
15 detailed dump ever two seconds. 31 detailed dump ever two seconds.
16 32
17 ## The Advanced Way 33 ## The Advanced Way
18 34
19 If you need more control over the granularity of the memory dumps, you can 35 If you need more control over the granularity of the memory dumps, you can
20 specify a custom trace config file as follows: 36 specify a custom trace config file as follows:
21 37
22 $ cat > /tmp/trace.config 38 $ cat > /tmp/trace.config
23 { 39 {
24 "startup_duration": 4, 40 "startup_duration": 4,
25 "result_file": "/tmp/trace.json", 41 "result_file": "/tmp/trace.json",
26 "trace_config": { 42 "trace_config": {
27 "included_categories": ["disabled-by-default-memory-infra"], 43 "included_categories": ["disabled-by-default-memory-infra"],
28 "excluded_categories": ["*"], 44 "excluded_categories": ["*"],
29 "memory_dump_config": { 45 "memory_dump_config": {
30 "triggers": [ 46 "triggers": [
31 { "mode": "light", "periodic_interval_ms": 50 }, 47 { "mode": "light", "periodic_interval_ms": 50 },
32 { "mode": "detailed", "periodic_interval_ms": 1000 } 48 { "mode": "detailed", "periodic_interval_ms": 1000 }
33 ] 49 ]
34 } 50 }
35 } 51 }
36 } 52 }
37 53
38 $ chrome --no-sandbox --trace-config-file=/tmp/trace.config 54 $ chrome --no-sandbox --trace-config-file=/tmp/trace.config
39 55
56 On Android, the config file has to be pushed to a fixed file location:
57
58 $ adb root
59 $ adb push /tmp/trace.config /data/local/chrome-trace-config.json
60
61 $ build/android/adb_run_chrome_public
62
63 $ adb pull /sdcard/Download/trace.json # After tracing.
64
65 Make sure that the "result_file" location is writable by the Chrome process on
66 Android (e.g. "/sdcard/Download/trace.json"). Note that startup tracing will be
67 enabled upon every Chrome launch until you delete the config file:
68
69 $ adb shell rm /data/local/chrome-trace-config.json
70
40 ## Related Pages 71 ## Related Pages
41 72
42 * [General information about startup tracing](https://sites.google.com/a/chromi um.org/dev/developers/how-tos/trace-event-profiling-tool/recording-tracing-runs) 73 * [General information about startup tracing](https://sites.google.com/a/chromi um.org/dev/developers/how-tos/trace-event-profiling-tool/recording-tracing-runs)
43 * [Memory tracing with MemoryInfra](memory_infra.md) 74 * [Memory tracing with MemoryInfra](memory_infra.md)
OLDNEW
« 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