OLD | NEW |
1 # Linux Profiling | 1 # Linux Profiling |
2 | 2 |
3 How to profile Chromium on Linux. | 3 How to profile Chromium on Linux. |
4 | 4 |
5 See | 5 See |
6 [Profiling Chromium and WebKit](https://sites.google.com/a/chromium.org/dev/deve
lopers/profiling-chromium-and-webkit) | 6 [Profiling Chromium and WebKit](https://sites.google.com/a/chromium.org/dev/deve
lopers/profiling-chromium-and-webkit) |
7 for alternative discussion. | 7 for alternative discussion. |
8 | 8 |
9 ## CPU Profiling | 9 ## CPU Profiling |
10 | 10 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 `.so` than the rest of the code. | 157 `.so` than the rest of the code. |
158 | 158 |
159 #### More reading | 159 #### More reading |
160 | 160 |
161 For further information, please refer to | 161 For further information, please refer to |
162 http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html. | 162 http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html. |
163 | 163 |
164 ### Massif | 164 ### Massif |
165 | 165 |
166 [Massif](http://valgrind.org/docs/manual/mc-manual.html) is a | 166 [Massif](http://valgrind.org/docs/manual/mc-manual.html) is a |
167 [Valgrind](http://www.chromium.org/developers/how-tos/using-valgrind)-based heap | 167 [Valgrind](https://www.chromium.org/developers/how-tos/using-valgrind)-based hea
p |
168 profiler. It is much slower than the heap profiler from google-perftools, but it | 168 profiler. It is much slower than the heap profiler from google-perftools, but it |
169 may have some advantages. (In particular, it handles the multi-process | 169 may have some advantages. (In particular, it handles the multi-process |
170 executables well). | 170 executables well). |
171 | 171 |
172 First, you will need to build massif from valgrind-variant project yourself, | 172 First, you will need to build massif from valgrind-variant project yourself, |
173 it's [easy](http://code.google.com/p/valgrind-variant/wiki/HowTo). | 173 it's [easy](http://code.google.com/p/valgrind-variant/wiki/HowTo). |
174 | 174 |
175 Then, make sure your Chromium is built using the | 175 Then, make sure your Chromium is built using the |
176 [valgrind instructions](http://www.chromium.org/developers/how-tos/using-valgrin
d). | 176 [valgrind instructions](https://www.chromium.org/developers/how-tos/using-valgri
nd). |
177 Now, you can run massif like this: | 177 Now, you can run massif like this: |
178 | 178 |
179 ``` | 179 ``` |
180 path-to-valgrind-variant/valgrind/inst/bin/valgrind \ | 180 path-to-valgrind-variant/valgrind/inst/bin/valgrind \ |
181 --fullpath-after=/chromium/src/ \ | 181 --fullpath-after=/chromium/src/ \ |
182 --trace-children-skip=*npviewer*,/bin/uname,/bin/sh,/usr/bin/which,/bin/ps,/b
in/grep,/usr/bin/linux32 \ | 182 --trace-children-skip=*npviewer*,/bin/uname,/bin/sh,/usr/bin/which,/bin/ps,/b
in/grep,/usr/bin/linux32 \ |
183 --trace-children=yes \ | 183 --trace-children=yes \ |
184 --tool=massif \ | 184 --tool=massif \ |
185 out/Release/chrome --noerrdialogs --disable-hang-monitor --other-chrome-flags | 185 out/Release/chrome --noerrdialogs --disable-hang-monitor --other-chrome-flags |
186 ``` | 186 ``` |
(...skipping 15 matching lines...) Expand all Loading... |
202 Xephyr :1 -ac -screen 800x600 & | 202 Xephyr :1 -ac -screen 800x600 & |
203 DISPLAY=:1 out/Debug/chrome | 203 DISPLAY=:1 out/Debug/chrome |
204 | 204 |
205 When ready to start debugging issue the following command, which will tell | 205 When ready to start debugging issue the following command, which will tell |
206 Xephyr to start drawing red rectangles: | 206 Xephyr to start drawing red rectangles: |
207 | 207 |
208 kill -USR1 `pidof Xephyr` | 208 kill -USR1 `pidof Xephyr` |
209 | 209 |
210 For further information, please refer to | 210 For further information, please refer to |
211 http://cgit.freedesktop.org/xorg/xserver/tree/hw/kdrive/ephyr/README. | 211 http://cgit.freedesktop.org/xorg/xserver/tree/hw/kdrive/ephyr/README. |
OLD | NEW |