diff options
author | Android Partner Docs <noreply@android.com> | 2017-06-19 21:12:35 -0700 |
---|---|---|
committer | Clay Murphy <claym@google.com> | 2017-06-20 13:09:22 -0700 |
commit | d72514453123a8634ae55406807d77f03362a2bd (patch) | |
tree | b528f70cbfa22decfea5899870efc1a42e7b7778 /en/devices/tech/dalvik/jit-compiler.html | |
parent | 8560a623b8040782583740e9dd1cbc4be310a568 (diff) | |
download | source.android.com-d72514453123a8634ae55406807d77f03362a2bd.tar.gz |
Docs: Changes to source.android.com
- 159519221 Add CTS Media 1.3 file link by claym <claym@google.com>
- 159296442 Changed devsite tag classes on a couple pages. by cqn <cqn@google.com>
- 159296357 Add devsite class to tags in devices/tech/power by cqn <cqn@google.com>
- 159296314 Added devsite class to tags in compatibility/cts. by cqn <cqn@google.com>
- 159296265 Added devsite class to tags in devices/tech/ota. by cqn <cqn@google.com>
- 159273197 Added devsite class to tags for devices/tech/test_infra/t... by cqn <cqn@google.com>
- 159269559 Add speed-profile and verify-profile to the list of options by claym <claym@google.com>
- 159268556 Add devsite class to tags in devices/tech/display by cqn <cqn@google.com>
- 159247742 Add devsite class to tags in devices/tech/admin by cqn <cqn@google.com>
- 159246177 Finished adding devsite class to tags on devices/tech/debug by cqn <cqn@google.com>
- 159245597 Add devsite tag to classes in devices/tech/debug by cqn <cqn@google.com>
- 159128910 Changed breaks to paragraph tags for formatting, and adde... by cqn <cqn@google.com>
- 159115811 Add devsite class to tags for devices/tech/config by cqn <cqn@google.com>
- 159115392 Added devsite class to tags on devices/tech/connect and d... by cqn <cqn@google.com>
- 159114997 Add devsite class to tags in devices/storage and devices/tv by cqn <cqn@google.com>
- 158948331 Provide advice to OEM and carrier app developers to reduc... by Android Partner Docs <noreply@android.com>
- 158920824 Add devsite class to tags in devices/tech/dalvik by cqn <cqn@google.com>
- 158917965 Fix links to sensors.h reference file by claym <claym@google.com>
- 158916603 Docs: moving gdb to own page, updating index by hvm <hvm@google.com>
- 158915436 Update Security acknowledgement with new researcher info by daroberts <daroberts@google.com>
- 158883841 Finish adding devsite class to tags in devices/audio by cqn <cqn@google.com>
- 158883680 Add devsite class to tags in devices/sensors and devices/... by cqn <cqn@google.com>
- 158871012 Improve Jack deprecation warning message. by gdimino <gdimino@google.com>
- 158867373 Add devsite classes to tags for devices/graphics by cqn <cqn@google.com>
- 158867298 Added devsite classes to tags in devices/input by cqn <cqn@google.com>
- 158867192 Add devsite classes to tags in devices/camera and devices... by cqn <cqn@google.com>
PiperOrigin-RevId: 159519221
Change-Id: I924de0c1668bcbcc94ee97e60c144aac4c81708d
Diffstat (limited to 'en/devices/tech/dalvik/jit-compiler.html')
-rw-r--r-- | en/devices/tech/dalvik/jit-compiler.html | 85 |
1 files changed, 51 insertions, 34 deletions
diff --git a/en/devices/tech/dalvik/jit-compiler.html b/en/devices/tech/dalvik/jit-compiler.html index 6c874d84..9090349c 100644 --- a/en/devices/tech/dalvik/jit-compiler.html +++ b/en/devices/tech/dalvik/jit-compiler.html @@ -54,7 +54,7 @@ JIT/AOT Compilation</a> on developer.android.com for a more thorough overview. <h2 id="architectural-overview">Architectural Overview</h2> -<img src="images/jit-arch.png" alt="JIT architecture" width="633" id="JIT-architecture" /> +<img src="/devices/tech/dalvik/images/jit-arch.png" alt="JIT architecture" width="633" id="JIT-architecture" /> <p class="img-caption"> <strong>Figure 1.</strong> JIT architecture - how it works </p> @@ -83,12 +83,12 @@ application has access to the directory. compilation.</li> </ol> -<img src="images/jit-profile-comp.png" alt="Profile-guided comp" width="452" id="JIT-profile-comp" /> +<img src="/devices/tech/dalvik/images/jit-profile-comp.png" alt="Profile-guided comp" width="452" id="JIT-profile-comp" /> <p class="img-caption"> <strong>Figure 2.</strong> Profile-guided compilation </p> -<img src="images/jit-daemon.png" alt="JIT daemon" width="718" id="JIT-daemon" /> +<img src="/devices/tech/dalvik/images/jit-daemon.png" alt="JIT daemon" width="718" id="JIT-daemon" /> <p class="img-caption"> <strong>Figure 3.</strong> How the daemon works </p> @@ -103,7 +103,7 @@ to behave more like shared libraries. See the following high-level overview of how JIT works in the next diagram. </p> -<img src="images/jit-workflow.png" alt="JIT architecture" width="707" id="JIT-workflow" /> +<img src="/devices/tech/dalvik/images/jit-workflow.png" alt="JIT architecture" width="707" id="JIT-workflow" /> <p class="img-caption"> <strong>Figure 4.</strong> JIT data flow </p> @@ -183,7 +183,7 @@ compilation to a later stage). The compilation levels can be configured via system properties with the defaults being: </p> -<pre> +<pre class="devsite-click-to-copy"> pm.dexopt.install=interpret-only pm.dexopt.bg-dexopt=speed-profile pm.dexopt.ab-ota=speed-profile @@ -211,20 +211,20 @@ copying and pasting. A few common use cases: <h3 id="turn-on-jit-logging">Turn on JIT logging</h3> -<pre> -$ adb root -$ adb shell stop -$ adb shell setprop dalvik.vm.extra-opts -verbose:jit -$ adb shell start +<pre class="devsite-click-to-copy"> +<code class="devsite-terminal">adb root</code> +<code class="devsite-terminal">adb shell stop</code> +<code class="devsite-terminal">adb shell setprop dalvik.vm.extra-opts -verbose:jit</code> +<code class="devsite-terminal">adb shell start</code> </pre> <h3 id="disable-jit-and-run-applications-in-interpreter">Disable JIT</h3> -<pre> -$ adb root -$ adb shell stop -$ adb shell setprop dalvik.vm.usejit false -$ adb shell start +<pre class="devsite-click-to-copy"> +<code class="devsite-terminal">adb root</code> +<code class="devsite-terminal">adb shell stop</code> +<code class="devsite-terminal">adb shell setprop dalvik.vm.usejit false</code> +<code class="devsite-terminal">adb shell start</code> </pre> <h3 id="force-compilation-of-a-specific-package">Force compilation of a specific @@ -232,11 +232,15 @@ package</h3> <ul> <li>Profile-based: -<code>$ adb shell cmd package compile -m speed-profile -f -my-package</code> +<pre class="devsite-terminal devsite-click-to-copy"> +adb shell cmd package compile -m speed-profile -f my-package +</pre> +</li> <li>Full: -<code>$ adb shell cmd package compile -m speed -f -my-package</code></li> +<pre class="devsite-terminal devsite-click-to-copy"> +adb shell cmd package compile -m speed -f my-package +</pre> +</li> </ul> <h3 id="force-compilation-of-all-packages">Force compilation of all @@ -244,20 +248,31 @@ packages</h3> <ul> <li>Profile-based: -<code>$ adb shell cmd package compile -m speed-profile -f --a</code> +<pre class="devsite-terminal devsite-click-to-copy"> +adb shell cmd package compile -m speed-profile -f -a +</pre> +</li> <li>Full: -<code>$ adb shell cmd package compile -m speed -f -a</code></li></ul> +<pre class="devsite-terminal devsite-click-to-copy"> +adb shell cmd package compile -m speed -f -a +</pre> +</li> +</ul> <h3 id="clear-profile-data-and-remove-compiled-code">Clear profile data and remove compiled code</h3> <ul> <li>One package: -<code>$ adb shell cmd package compile --reset my-package</code> +<pre class="devsite-terminal devsite-click-to-copy"> +adb shell cmd package compile --reset my-package +</pre> +</li> <li>All packages -<code>$ adb shell cmd package compile --reset --a</code></li> +<pre class="devsite-terminal devsite-click-to-copy"> +adb shell cmd package compile --reset -a +</pre> +</li> </ul> <h2 id="recommendation">Recommendation</h2> @@ -270,7 +285,7 @@ Note that it is strongly recommended to use the default following support. </p> -<pre> +<pre class="devsite-click-to-copy"> pm.dexopt.install=interpret-only pm.dexopt.bg-dexopt=speed-profile pm.dexopt.boot=verify-profile (or interpret-only) @@ -281,7 +296,7 @@ Here’s a detailed explanation about the <code>pm.dexopt</code> options, and th reasoning for our recommendations: </p> -<pre> +<pre class="devsite-click-to-copy"> pm.dexopt.install </pre> @@ -290,7 +305,7 @@ This is the compilation filter used when installing application through the Play Store. For faster installs we recommend <code>interpret-only</code>. </p> -<pre> +<pre class="devsite-click-to-copy"> pm.dexopt.bg-dexopt </pre> @@ -300,7 +315,7 @@ fully charged. We recommend using <code>speed-profile</code> to take advantage of profile guided compilation and save on storage. </p> -<pre> +<pre class="devsite-click-to-copy"> pm.dexopt.ab-ota </pre> @@ -311,7 +326,7 @@ update. If the device supports A/B OTA, we recommend using save on storage. </p> -<pre> +<pre class="devsite-click-to-copy"> pm.dexopt.nsys-library pm.dexopt.shared-apk pm.dexopt.core-app @@ -324,7 +339,7 @@ the <code>speed</code> filter, as the platform does not support efficient profiling of them. </p> -<pre> +<pre class="devsite-click-to-copy"> pm.dexopt.first-boot </pre> @@ -336,7 +351,7 @@ use the phone for the very first time. Note that if all applications in /system are already speed compiled, <code>pm.dexopt.first-boot</code> has no effect. </p> -<pre> +<pre class="devsite-click-to-copy"> pm.dexopt.boot </pre> @@ -364,11 +379,13 @@ filter. To do this, edit the following files to include these entries. <p>Add the following entry to <code>BoardConfig.mk</code>:</p> -<pre>WITH_DEXPREOPT := true</pre> +<pre class="devsite-click-to-copy"> +WITH_DEXPREOPT := true +</pre> <p>Add the following entry to <code>device.mk</code>:</p> -<pre> +<pre class="devsite-click-to-copy"> PRODUCT_DEX_PREOPT_DEFAULT_FLAGS := --compiler-filter=interpret-only </pre> |