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

Side by Side Diff: mojo/devtools/common/README.md

Issue 1329963002: Document the --trace-startup shell flag. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 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 # Devtools 1 # Devtools
2 2
3 Unopinionated tools for **running**, **debugging** and **testing** Mojo apps. 3 Unopinionated tools for **running**, **debugging** and **testing** Mojo apps.
4 4
5 ## Install 5 ## Install
6 6
7 ``` 7 ```
8 git clone https://github.com/domokit/devtools.git 8 git clone https://github.com/domokit/devtools.git
9 ``` 9 ```
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 By default, `mojo_run` uses https://core.mojoapps.io/kiosk_wm.mojo as the window 50 By default, `mojo_run` uses https://core.mojoapps.io/kiosk_wm.mojo as the window
51 manager. You can pass a different window manager url using the 51 manager. You can pass a different window manager url using the
52 `--window-manager` flag to override this. 52 `--window-manager` flag to override this.
53 53
54 ### Debugger 54 ### Debugger
55 55
56 `mojo_debug` allows you to interactively inspect a running shell, collect 56 `mojo_debug` allows you to interactively inspect a running shell, collect
57 performance traces and attach a gdb debugger. 57 performance traces and attach a gdb debugger.
58 58
59 #### Tracing 59 #### Tracing
60 In order to collect [performance 60 [Performance
61 traces](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) 61 traces](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool)
62 interactively through `mojo_debug`, make sure that the app being inspected was 62 can either be collected by Mojo Shell during its startup, or collected
63 run with `--debugger` switch. E.g.: 63 interactively by `mojo_debug`.
64
65 To trace the Mojo Shell startup, use the `--trace-startup` flag:
66
67 ```sh
68 mojo_run --trace-startup APP_URL [--android]
69 ```
70
71 In order to collect traces interactively through `mojo_debug`, make sure that
72 the app being inspected was run with `--debugger` switch. E.g.:
64 73
65 ```sh 74 ```sh
66 mojo_run --debugger APP_URL [--android] 75 mojo_run --debugger APP_URL [--android]
67 ``` 76 ```
68 77
69 Then, in another shell, tracing can be orchestrated as follows: 78 While Mojo Shell is running, tracing can be started and stopped by these two
79 commands respectively:
70 80
71 ```sh 81 ```sh
72 mojo_debug tracing start 82 mojo_debug tracing start
73 mojo_debug tracing stop [result.json] 83 mojo_debug tracing stop [result.json]
74 ``` 84 ```
75 85
76 The trace file can be then loaded using the trace viewer in Chrome available at 86 Trace files can be then loaded using the trace viewer in Chrome available at
77 `about://tracing`. 87 `about://tracing`.
78 88
79 #### GDB 89 #### GDB
80 It is possible to inspect a Mojo Shell process using GDB. The `mojo_debug` 90 It is possible to inspect a Mojo Shell process using GDB. The `mojo_debug`
81 script can be used to launch GDB and attach it to a running shell process 91 script can be used to launch GDB and attach it to a running shell process
82 (android only): 92 (android only):
83 93
84 ```sh 94 ```sh
85 mojo_debug gdb attach 95 mojo_debug gdb attach
86 ``` 96 ```
(...skipping 27 matching lines...) Expand all
114 ```sh 124 ```sh
115 mojo_debug device stack 125 mojo_debug device stack
116 ``` 126 ```
117 127
118 ## Development 128 ## Development
119 129
120 The library is canonically developed [in the mojo 130 The library is canonically developed [in the mojo
121 repository](https://github.com/domokit/mojo/tree/master/mojo/devtools/common), 131 repository](https://github.com/domokit/mojo/tree/master/mojo/devtools/common),
122 https://github.com/domokit/devtools is a mirror allowing to consume it 132 https://github.com/domokit/devtools is a mirror allowing to consume it
123 separately. 133 separately.
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