diff options
author | Yohann Roussel <yroussel@google.com> | 2015-11-04 20:55:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-11-04 20:55:54 +0000 |
commit | 9094651366b598235536e624d6fc114e50d0d26a (patch) | |
tree | 0f067b81ea3d2318c4f44661fd1994bdb8138092 | |
parent | c7557e40a8e0d5c004a2f05a75be0644dbf70c44 (diff) | |
parent | c1bac9e658e28728da778d44863bd81dd96db8a7 (diff) | |
download | toolchain_jack-9094651366b598235536e624d6fc114e50d0d26a.zip toolchain_jack-9094651366b598235536e624d6fc114e50d0d26a.tar.gz toolchain_jack-9094651366b598235536e624d6fc114e50d0d26a.tar.bz2 |
Merge "Replace README.txt by a link to AOSP page" into ub-jack-brest
-rw-r--r-- | jack-server/README.txt | 102 | ||||
-rw-r--r-- | jack/README.txt | 151 |
2 files changed, 1 insertions, 252 deletions
diff --git a/jack-server/README.txt b/jack-server/README.txt deleted file mode 100644 index 13fbe7e..0000000 --- a/jack-server/README.txt +++ /dev/null @@ -1,102 +0,0 @@ -########### -Jack server -########### - -The first time jack is used, it launches a local Jack compilation server on your computer: -- This server brings an intrinsic speedup because it avoids launching a new JVM, loading Jack code, - initializing Jack and warming up the JIT at each compilation. This server speeds up the - compilation of a tree to be really close to the old toolchain, but also provides very good - compilation times during small compilations (e.g. in incremental mode). -- The server is also a short-term solution to control the number of parallel Jack compilations, and - so to avoid the overloading of your computer (memory or disk issue), because it limits the number - of parallel compilations. - -The Jack server shutdowns itself after an idle time without any compilation. It uses two TCP ports -on the localhost interface, and so is not available externally. All these parameters (number of -parallel compilations, timeout, ports number, ... can be modified by editing the $HOME/.jack file). - - - -$HOME/.jack file ----------------- - -The $HOME/.jack file are setting Jack server variables in a full bash syntax. Follows description -with default value: - -SERVER=true - Enable the server feature of jack - -SERVER_PORT_SERVICE=8072 - Set the TCP port number of the server for compilation purpose - -SERVER_PORT_ADMIN=8073 - Set the TCP port number of the server for admin purpose - -SERVER_COUNT=1 - Not used today - -SERVER_NB_COMPILE=4 - Number of maximum parallel compilations allowed - -SERVER_TIMEOUT=60 - Number of idle seconds the server has to wait without any compilation before shutting down itself - -SERVER_LOG=${SERVER_LOG:=$SERVER_DIR/jack-$SERVER_PORT_SERVICE.log} - File where server logs are written. By default, this variable can be overloaded by environment - variable - -JACK_VM_COMMAND=${JACK_VM_COMMAND:=java} - The default command used to launch a JVM on the host. By default, this variable can be overloaded - by environment variable - - - -Log file --------- - -The log is at $ANDROID_BUILD_TOP/out/dist/logs/jack-server.log if you ran a make command with a dist -target, or else you can find it in by running "jack-admin server-log". - - - -Troubleshooting ---------------- - -If your computer becomes unresponsive during compilation or if you experience Jack compilations -failing on “Out of memory error.” - -You can improve the situation by reducing the number of jack simultaneous compilations by editing -your $HOME/.jack and changing SERVER_NB_COMPILE to a lower value. - - -If your compilations are failing on “Cannot launch background server” - -The most likely cause is TCP ports are already used on your computer. Try to change it by editing -your $HOME/.jack (SERVER_PORT_SERVICE and SERVER_PORT_ADMIN variables). - -If it doesn’t solve the problem, please report and attach you compilation log and the jack server -log (see previous section where to find it). To unblock the situation, disable jack compilation -server by editing your $HOME/.jack and changing SERVER to false. Unfortunately this will -significantly slow down your compilation and may force you to launch make -j with load control -(option "-l" of make). For example we're using make -j -l 60 on a Z620. Feel free to adjust -l -argument according to your machine configuration. - - -If your compilation gets stuck without any progress - -Please report and give us additional information when possible: -- The command line getting stuck. -- The output this command line. -- The result of executing a “jack-admin server-stat”. -- The file $HOME/.jack. -- The content of the server log with the server state dumped: - - Find the jack background server process: “jack-admin list-server”. - - Send a “kill -3” to this server to dump his state in the log file. - - To know where is the server log file, execute “jack-admin server-log”. -- The result of executing “ls -lR $TMPDIR/jack-$USER”. -- The result of running something like “ps j -U $USER”. - -You should be able to unblock yourself by killing the Jack background server (use “jack-admin -kill-server”). - - diff --git a/jack/README.txt b/jack/README.txt index bdf6877..72ac230 100644 --- a/jack/README.txt +++ b/jack/README.txt @@ -1,151 +1,2 @@ -######## -Overview -######## - -Jack is a new Android toolchain generating dex files. Jack is available in AOSP, reduces the number -of external tools and provides an incremental compilation support to reduce development compilation -time. - -Jack source code is available in AOSP in ub-jack* branches, -Overview, supported features, how to use in Gradle and SDK release notes can be found on our public -tool page http://tools.android.com/tech-docs/jackandjill. - -Jack provides: - -A compiler from Java programming language source to the Android dex file format -Several features integrated in the same tool -An incremental compilation to speedup the compilation time -Jill is another tool that translates an existing .jar to a .jack library file format. - - - -##################################### -How to use in the Android source tree -##################################### - -Below we describe how to use Jack in the Android source tree. Please have a look to Limitations -sections before starting using it. - - - -How to use Jack ---------------- - -If you're working in a tree supporting Jack and it's not default you can enable Jack with - -$ export ANDROID_COMPILE_WITH_JACK=true - -Then use your standard makefile commands to compile the tree or your project. - -Jack uses a local compilation server on your computer. For more information about the Jack server -and its configuration files see jack-server/README.txt. - -Currently the incremental compilation is not enabled by default. Please have a look to 'Using Jack -incremental compilation' section. - - - -Troubleshooting ---------------- - -If you have issues, or want to provide feedback - -To report bugs or request features use our issue tracker, available at http://b.android.com and use -the templates Jack tool bug report -(https://code.google.com/p/android/issues/entry?template=Jack%20bug%20report) -or Jack tool feature request -(https://code.google.com/p/android/issues/entry?template=Jack%20feature%20request). - - -How to get detailed build logs in case of Jack failure - -In case of Jack failures, you can have a more detailed log by setting one variable: - -$ export ANDROID_JACK_EXTRA_ARGS="--verbose debug --sanity-checks on -D sched.runner=single-threaded" - -Then use your standard makefile commands to compile the tree or your project and attach its standard -output and error. -Attach also the Jack server log: The log is at $ANDROID_BUILD_TOP/out/dist/logs/jack-server.log if -you ran a make command with a dist target, or else you can find it in by running -"jack-admin server-log". - - -To remove detailed build logs use: - -$ unset ANDROID_JACK_EXTRA_ARGS - -Your problems may also be related to the Jack server, check the "troubleshooting" section of -jack-server/README.txt. - - -If you are blocked due to a Jack bug - -You can continue to work -on your own tree by temporarily switching to javac/dx toolchain. You must remove all dex files in -the 'out' directory, and disable Jack with the command lines below. Then use your standard makefile -commands to compile the tree or your project. - -$ mm clean-dex-files - -$ export ANDROID_COMPILE_WITH_JACK=false - -If a Jack bug is solved, you can switch back to Jack toolchain in your tree, you must remove all dex -files in the 'out' directory, and enable Jack with the command line below. Then use your standard -makefile commands to compile the tree or your project. - -$ mm clean-dex-files - -$ export ANDROID_COMPILE_WITH_JACK=true - - - -Using Jack incremental compilation ----------------------------------- - -Enabling incremental support in a project - -Add the following line to the Android.mk file of the project that you want to build incrementally. - -LOCAL_JACK_ENABLED := incremental - -The first time that you build your project with Jack if some dependencies are not built, use mma to -build them, and after that you can use the standard build command. - - -If you have issues - -If you are experimenting issues using the incremental support, first please file a bug report and -attach the incremental log that is located in the folder jack-incremental/logs into the output -folder of your module to the bug report. Please send also detailed build logs (see previous section -for how to). - -Then clean your incremental folder to restart from a full compilation of your module in order to see - if it resolves your problem by using: - -mm clean-jack-incremental - -Then if the problem persists, it is recommended to disable incremental support and try again (see -below for how to). - - -How to disable incremental support - -Revert the modification done in your Android.mk and clear your incremental folder by using the -following command lines: - -mm clean-jack-incremental - - - -Known limitations ------------------ - -- The Jack server is mono-user by default, so can be only used by one user on a computer. If it is - not the case, please, choose different port numbers for each user and adjust SERVER_NB_COMPILE - accordingly. You can also disable the Jack server by setting SERVER=false in your $HOME/.jack. -- CTS compilation is very slow because of vm-tests-tf integration. -- The build system is not fully optimized for Jack: we're currently doing extra jobs during the tree - compilation. -- Bytecode manipulation tools, like JaCoCo, are not supported. - +Please see documentation at https://source.android.com/source/jack.html |