OLD | NEW |
1 # Profiling Content Shell on Android | 1 # Profiling Content Shell on Android |
2 | 2 |
3 Below are the instructions for setting up profiling for Content Shell on | 3 Below are the instructions for setting up profiling for Content Shell on |
4 Android. This will let you generate profiles for ContentShell. This will require | 4 Android. This will let you generate profiles for ContentShell. This will require |
5 linux, building an userdebug Android build, and wiping the device. | 5 linux, building an userdebug Android build, and wiping the device. |
6 | 6 |
7 [TOC] | 7 [TOC] |
8 | 8 |
9 ## Prepare your device. | 9 ## Prepare your device. |
10 | 10 |
11 You need an Android 4.2+ device (Galaxy Nexus, Nexus 4, 7, 10, etc.) which you | 11 You need an Android 4.2+ device (Galaxy Nexus, Nexus 4, 7, 10, etc.) which you |
12 don’t mind erasing all data, rooting, and installing a userdebug build on. | 12 don’t mind erasing all data, rooting, and installing a userdebug build on. |
13 | 13 |
14 ## Get and build `content_shell_apk` for Android | 14 ## Get and build `content_shell_apk` for Android |
15 | 15 |
16 (These instructions have been carefully distilled from the | 16 (These instructions have been carefully distilled from the |
17 [Android Build Instructions](android_build_instructions.md).) | 17 [Android Build Instructions](android_build_instructions.md).) |
18 | 18 |
19 1. Get the code! You’ll want a second checkout as this will be | 19 1. Get the code! You’ll want a second checkout as this will be |
20 android-specific. You know the drill: | 20 android-specific. You know the drill: |
21 http://dev.chromium.org/developers/how-tos/get-the-code | 21 https://www.chromium.org/developers/how-tos/get-the-code |
22 1. Append this to your `.gclient` file: `target_os = ['android']` | 22 1. Append this to your `.gclient` file: `target_os = ['android']` |
23 1. Create `chromium.gyp_env` next to your `.gclient` file: | 23 1. Create `chromium.gyp_env` next to your `.gclient` file: |
24 `echo "{ 'GYP_DEFINES': 'OS=android', }" > chromium.gyp_env` | 24 `echo "{ 'GYP_DEFINES': 'OS=android', }" > chromium.gyp_env` |
25 1. (Note: All these scripts assume you’re using "bash" (default) as your | 25 1. (Note: All these scripts assume you’re using "bash" (default) as your |
26 shell.) | 26 shell.) |
27 1. Sync and runhooks (be careful not to run hooks on the first sync): | 27 1. Sync and runhooks (be careful not to run hooks on the first sync): |
28 | 28 |
29 ``` | 29 ``` |
30 gclient sync --nohooks | 30 gclient sync --nohooks |
31 . build/android/envsetup.sh | 31 . build/android/envsetup.sh |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 ``` | 195 ``` |
196 adb pull /proc/kallsyms symbols/kallsyms | 196 adb pull /proc/kallsyms symbols/kallsyms |
197 ``` | 197 ``` |
198 | 198 |
199 1. Now add --kallsyms to your perfhost\_linux command: | 199 1. Now add --kallsyms to your perfhost\_linux command: |
200 ``` | 200 ``` |
201 ./perfhost_linux report -g -i perf.data --symfs symbols/ \ | 201 ./perfhost_linux report -g -i perf.data --symfs symbols/ \ |
202 --kallsyms=symbols/kallsyms | 202 --kallsyms=symbols/kallsyms |
203 ``` | 203 ``` |
OLD | NEW |