summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options.h
AgeCommit message (Collapse)Author
2017-05-30ART: Add missing namespace commentsAndreas Gampe
Add closing namespace comments. Bug: 32619234 Test: m Change-Id: I1f50e09dcd1038c4b540b87e5c19e319c1f592e4
2017-05-17Ignore --compile-pic option for JIT.Vladimir Marko
Test: testrunner --host --pictest --jit Bug: 33192586 Change-Id: I1e05874752c6a3b448ffbeff9681637a35acda2a
2017-04-21Rename and obsolete compiler filter names.Nicolas Geoffray
ART side of the change. bug:34715556 test: test-art-host, jdwp, libcore Change-Id: I3a73ae4af2d602431150c8ecfceaddb9ba519cee
2017-03-24Improvements in the Inliner.Nicolas Geoffray
- Change from a depth limit to a total number of HInstructions inlined limit. Remove the dex2oat depth limit argument. - Add more stats to diagnose reasons for not inlining. - Clean up logging to easily parse output. Individual Ritz benchmarks improve from 3 to 10%. No change in other heuristics. There was already an instruction budget. Note that the instruction budget is rarely hit in the "apps" I've tried with. Compile-times improve from 5 to 15%. Code size go from 4% increase (Gms) to 1% decrease (Docs). bug:35724239 test: test-art-host test-art-target Change-Id: I5a35c4bd826cf21fead77859709553c5b57608d6
2017-03-08Remove --include-patch-information option from dex2oat.Richard Uhler
Because we no longer support running patchoat on npic oat files, which means the included patch information is unused . Bug: 33192586 Test: m test-art-host Change-Id: I9e100c4e47dc24d91cd74226c84025e961d30f67
2016-12-21Optimize OatWriter when we don't compile any method.Nicolas Geoffray
- Don't write any quickening info. - Don't visit methods. Saves ~20% of compilation times. Test: test-art-host Change-Id: Ib18fd06c0ca42308e1d81401de0ee3e6297de0ce
2016-11-18Add dequickening support.Nicolas Geoffray
Both vdex and BCI require full dequickening support. This change implements dequickening by using the existing encoded quickening, and adds the checkcast quickening to that encoding. bug: 30937355 bug: 32369913 Test: dex_to_dex_decompiler_test.cc test-art-host Change-Id: Ie95f46946d59b28157d6e47dcf4a859be032d1c3
2016-10-26Save the non-verified classes in the VerifierDeps.Nicolas Geoffray
We will need that information when taking an OTA to make sure the same set of classes needs to be verified at runtime. Currently, the vdex file will contain a list of unverified classes. We could alternatively encode a bit vector of the size of the type_id array, but the few experiments I did show that the bit vector is actually larger. We can refine this later. bug: 30937355 test: m test-art-host test: verifier_deps_test.cc Change-Id: I2670e4fd2e54ee7a148246baa705fda3a56617ff
2016-10-18Remove mirror:: and ArtMethod deps in utils.{h,cc}David Sehr
The latest chapter in the ongoing saga of attempting to dump a DEX file without having to start a whole runtime instance. This episode finds us removing references to ArtMethod/ArtField/mirror. One aspect of this change that I would like to call out specfically is that the utils versions of the "Pretty*" functions all were written to accept nullptr as an argument. I have split these functions up as follows: 1) an instance method, such as PrettyClass that obviously requires this != nullptr. 2) a static method, that behaves the same way as the util method, but calls the instance method if p != nullptr. This requires using a full class qualifier for the static methods, which isn't exactly beautiful. I have tried to remove as many cases as possible where it was clear p != nullptr. Bug: 22322814 Test: test-art-host Change-Id: I21adee3614aa697aa580cd1b86b72d9206e1cb24
2016-10-05Generate SHA-1 build ID for host-generated *.oat files (1/2).Alexey Alexandrov
For host-generated *.oat files, generate a SHA-1 build ID based on the file content and write it to .note.gnu.build-id ELF section. This should allow various developer tools like profilers correlate the data captured for files like boot.oat on the device with the corresponding known version of the file during an offline analysis. Test: Verified that boot.oat contains the build ID section now (with this change and https://android-review.googlesource.com/#/c/275630 applied) Test: Added ElfWriterTest::CheckBuildIdPresent test. Test: make test-art-host Bug: 31292208 Change-Id: Ie5e89da2ef87e34c27c0237ab34ddc7d2dc0aa3b
2016-10-04Revert "Revert "Store resolved Strings for AOT code in .bss.""Vladimir Marko
Fixed oat_test to keep dex files alive. Fixed mips build. Rewritten the .bss GC root visiting and added write barrier to the artResolveStringFromCode(). Test: build aosp_mips-eng Test: m ART_DEFAULT_GC_TYPE=SS test-art-target-host-gtest-oat_test Test: Run ART test suite on host and Nexus 9. Bug: 20323084 Bug: 30627598 This reverts commit 5f926055cb88089d8ca27243f35a9dfd89d981f0. Change-Id: I07fa2278d82b8eb64964c9a4b66cb93726ccda6b
2016-09-30Revert "Store resolved Strings for AOT code in .bss."Vladimir Marko
There are some issues with oat_test64 on host and aosp_mips-eng. Also reverts "compiler_driver: Fix build." Bug: 20323084 Bug: 30627598 This reverts commit 63dccbbefef3014c99c22748d18befcc7bcb3b41. This reverts commit 04a44135ace10123f059373691594ae0f270a8a4. Change-Id: I568ba3e58cf103987fdd63c8a21521010a9f27c4
2016-09-29Store resolved Strings for AOT code in .bss.Vladimir Marko
And do some related refactorings. Bug: 20323084 Bug: 30627598 Test: Run ART test suite including gcstress on host and Nexus 9. Test: Run ART test suite including gcstress with baker CC on host and Nexus 9. Test: Build aosp_mips64-eng. Change-Id: I1b12c1570fee8e5da490b47f231050142afcbd1e
2016-08-08Implement running user defined list of passesWojciech Staszkiewicz
This change introduces new dex2oat switch --run-passes=. This switch accepts path to a text file with names of passes to run. Compiler will run optimization passes specified in the file rather then the default ones. There is no verification implemented on the compiler side. It is user's responsibility to provide a list of passes that leads to successful generation of correct code. Care should be taken to prepare a list that satisfies all dependencies between optimizations. We only take control of the optional optimizations. Codegen (builder), and all passes required for register allocation will run unaffected by this mechanism. Change-Id: Ic3694e53515fefcc5ce6f28d9371776b5afcbb4f
2016-08-06Add a register allocation strategy compiler optionMatthew Gharrity
Test: manually, on device. Change-Id: If007a1657dd5769ddef03691e0a19dbbe6ba1a29
2016-05-24Compile JNI stubs for verify-profile and interpret-only.Vladimir Marko
This is the intended behavior to have a good JNI transition performance. Bug: 28902384 (cherry picked from commit 8c185bf0c6f18a5349bc87a7e3751ba06d90f461) Change-Id: I52767909b916ada3c619206c8838b85bff5ac316
2016-05-03Remove -XOatFileManagerCompilerFilter argument.Richard Uhler
Instead use the value of '-Xcompiler-option --compiler-filter=XXX' for the target compiler filter to use to determine if the runtime should try to invoke dex2oat when oat files are loaded. Bug: 27641809 Change-Id: I1856e0e37df91835b81105567c70d8a285a88f62
2016-03-23Revert "Revert "Use compiler filter to determine oat file status.""Andreas Gampe
This reverts commit 845e5064580bd37ad5014f7aa0d078be7265464d. Add an option to change what OatFileManager considers up-to-date. In our tests we're allowed to write to the dalvik-cache, so it cannot be kSpeed. Bug: 27689078 Change-Id: I0c578705a9921114ed1fb00d360cc7448addc93a
2016-03-23Revert "Use compiler filter to determine oat file status."Nicolas Geoffray
Bots are red. Tentative reverting as this is likely the offender. Bug: 27689078 This reverts commit a62d2f04a6ecf804f8a78e722a6ca8ccb2dfa931. Change-Id: I3ec6947a5a4be878ff81f26f17dc36a209734e2a
2016-03-22Use compiler filter to determine oat file status.Richard Uhler
Record the compiler filter in the oat header. Use that to determine when the oat file is up-to-date with respect to a target compiler filter level. New xxx-profile filter levels are added to specify if a profile should be used instead of testing for the presence of a profile file. This change should allow for different compiler-filters to be set for different package manager use cases. Bug: 27689078 Change-Id: Id6706d0ed91b45f307142692ea4316aa9713b023
2016-03-21Remove Quick from tree.Nicolas Geoffray
So long, old friend. Change-Id: I0241c798a34b92bf994fed83888da67d6e7f1891
2016-03-18Add verify-profile compiler filterMathieu Chartier
Only verifies and dex2dex compiles classes in the profile. Goal is to reduce application launch time. ~2x faster than interpret-only for Facebook. Bug: 27688727 (cherry picked from commit a079e3aa62cceb76c1c1811e6e09bcaf75e20289) Change-Id: Iad5aa1adee3aa6c2408820e8cbbab2d4412021b8
2016-03-16Remove --native-debuggable compiler option.David Srbecky
Check if both --debuggable and --generate-debug-info are set instead. History: I have recently added the --native-debuggable flag to control whether extra stack maps are generated in order to produce accurate native line number mapping of all generated code. I didn't want to include it into --debuggable since we compile boot.oat as debuggable and so it would be affected. On second thought, it would have been reasonable to generate the extra stackmaps only if both --debuggable and --generate-debug-info are set, instead of introducing another compiler flag. This means we do not affect boot.oat but we still get the extra stack maps if DWARF debug information is explicitly requested. Change-Id: I7e5e557e4850a88b3b6f86178d2cb645fb1e1110
2016-03-09ART: Use optimizing compiler in image_testAndreas Gampe
Expose some compiler options so we can run the image test with the optimizing compiler without running into a stack overflow. Also allow a variable amount of threads in CreateCompilerDriver. Use 16 as a middle ground on the host to speed up the otherwise now slowed-down test. Bug: 27240085 Bug: 27552475 Change-Id: I8db5055d32ae722c8f430903244faa9166cc4886
2016-02-01Ignore image checksum for ExtractOnly oat filesDavid Brazdil
Oat files compiled with --compiler-filter=verify-at-runtime contain no compiled code and therefore are independent of the boot image. This patch stores an ExtractOnly flag in the oat header and skips the image checksum test if the flag is set, rendering the oat file up to date even after OTAs. Bug: 26813999 Change-Id: I25291d5b49d9e9d0018844e957a2dc88ef6bdc27
2016-01-28Merge "ART: Add option to ensure deterministic compilation"Andreas Gampe
2016-01-27ART: Add option to ensure deterministic compilationAndreas Gampe
To ensure reliable stable generation of a boot image, add a flag for forced determinism, trading compile time for a deterministic output. We have to run certain passes in the compiler-driver single-threaded. It is also necessary to try to make the heap layout deterministic. Switch to nonconcurrent GC, use the free-list implementation for LOS, and try to allocate the main space at a known location. This is best effort at the moment. To allow the compiler phase to be parallelized, const-strings need to be created beforehand. The identity hashcode seed needs to be pinned. Besides the Dex object we also need to null the DexFile pointer in dex caches. For classes, we need to remove the clinit thread ID. Fix oatdump alignment padding accounting. Bug: 26687569 Change-Id: Ia82120e8f715bb3691d861817b12778ac677355a
2016-01-27Merge "ART: Allow --no-inline-from to specify multiple dex files."Vladimir Marko
2016-01-27ART: Allow --no-inline-from to specify multiple dex files.Vladimir Marko
This will allow tests to specify arbitrary dex files from which we should not inline, in addition to core-oj, so that we can test the related functionality. Additionally, should the core-oj.jar core grow beyond a single classes.dex and require a multi-dex .jar, this change makes sure that we prevent inlining also from the extra classes<N>.dex files. Change-Id: I74da4839bf9bb405dd62ad80563bf646a7a65dd9
2016-01-26Revert "Revert "Add option to generate compressed backtrace info.""David Srbecky
This reverts commit 8546cc9aeb05e866e1fb6a9e4130d53ea330baa8. Change-Id: I676fdf9af27fa3b16fa8921778ff8832ab8c437d
2016-01-25Revert "Add option to generate compressed backtrace info."David Srbecky
This reverts commit 5fdcc3c931b70204fd8c491afa66f57f8428490f. Change-Id: I9c1f5aad6933a46af6717e3a90a51f76111f9c8a
2016-01-22Add option to generate compressed backtrace info.David Srbecky
Add flag --generate-mini-debug-info which generates LZMA compressed .symtab and .debug_frame, which are sufficient to print java backtraces in libunwind. If enabled, it increases the size of boot.oat by about 3.5%. Change-Id: Ic3c2ef7704c05fa328720c6781ca2a9b8e3935a3
2016-01-18Move --dump-cfg and dump-cfg-append to CompilerOptions.Nicolas Geoffray
It simplifies passing the option to the JIT. Change-Id: Iee1b722362899e5809ef97be90961e3dda1e16cc
2016-01-12Disable --generate-debug-info by default in all cases.David Srbecky
The option is disabled by default unless explicitly enabled. In particular, it is no longer enabled in debug builds, and the --debuggable option does not affect it. I want to use this flag to control the debug data generated by the JIT as well. Since this takes run-time memory, I want to avoid enabling it unless explicitly requested. Change-Id: I2e2afa2f56bb0a113e92cc2e26e00dceac1689ca
2016-01-04Revert "Revert "Tweak inlining heuristics.""Nicolas Geoffray
This reverts commit b17d1ccff0ac26fc22df671907ba2b4f4c656ce4. Change-Id: I26f6f8702a448c3da12662cbc6bc0f6e562bc40b
2015-12-23Dex2oat support for multiple oat file and image file outputs.Jeff Hao
Multiple changes to dex2oat and the runtime to support a --multi-image option. This generates a separate oat file and image file output for each dex file input. Change-Id: Ie1d6f0b8afa8aed5790065b8c2eb177990c60129
2015-12-23Generate more stack maps during native debugging.David Srbecky
Generate extra stack map at the start of each java statement. The stack maps are later translated to DWARF which allows LLDB to set breakpoints and view local variables. Change-Id: If00ab875513308e4a1399d1e12e0fe8934a6f0c3
2015-12-17Revert "Tweak inlining heuristics."Nicolas Geoffray
This reverts commit fcb7613d3aaa9a6802800b6e957aaad51cedf6dc. Change-Id: Idc0df6a2f68e8b5aa740bb1259f19c2953811510
2015-12-17Tweak inlining heuristics.Nicolas Geoffray
go/lem driven: Performance: Richards +41% CaffeineMethod +43% ReversiBench: +52% Towers: +73% Tak: +85% Memory use: 7% less memory CompileTime: 14% increase CodeSize: 8% increase Last three measures are now more acceptable given we JIT. Change-Id: Ic4aa6535d2b76cf3545ef00e9b2ae32330f10745
2015-10-30Refactor code so that JIT can parse compiler options.Nicolas Geoffray
Currently only the CompilerOptions class. We should also do it for the CompilerDriver options. This will fix the flakiness seen on jdwp testing, as the debuggable flag was not passed to the compiler. Change-Id: I4218dd5928c9f4fe2d6191ab11e5598e7cf84bcf
2015-08-20Be more flexible on the code unit size when inlining.Nicolas Geoffray
This change increases the maximum code unit size, and fold parameters in the inlinee in the hope to reduce the overall size of the graph. We then make sure we don't inline methods that have more than N HInstructions. Also, remove the kAccDontInline flag on ArtMethod. The compiler does not need it anymore. Change-Id: I4cd3da40e551f30ba83b8b274728b87e67f6812e
2015-08-07Tighten default inlining settings when using the space filter.Roland Levillain
Bug: 21868508 Change-Id: Ic83813a966cef18e59447083926bf033aa587154
2015-07-29Allow for fine tuning the inliner.Calin Juravle
Bug: 21868508 Change-Id: Ice7f1604ed65e3d4ed2a010ee431272b7d000cdb
2015-06-25ART: Fix kEverything compiler filterbuzbee
Previously the kEverything filter failed to compile class initializers. Now it will. Bug: 19576257 Change-Id: I189d2b5b379aee112c4e95f8d3e6c32abab6ed41
2015-05-28Add --generate-debug-info flag and remove the other two flags.David Srbecky
Replace the flags --include-debug-symbols and --include-cfi with single flag called --generate-debug-info (with alias -g). The name "symbol" was not ideal, since depending on context it may be interpreted as "ELF symbols", or "debugging information". This CL also means that we have only the options to include either all debugging information or none. This should be fine, since we can use standard tools to strip anything we do not want. Change-Id: I721fded56d755d7eed0ef36aa84e841a1f5747f8
2015-04-13Add --include-cfi compiler option.David Srbecky
Decouple generation of CFI from the rest of debug symbols. This makes it possible to generate oat with CFI but without the rest of debug symbols. This is in line with intention of the .eh_frame section. The section does not have the .debug_ prefix because it is considered somewhat different to the rest of debug symbols. Change-Id: I32816ecd4f30ac4e0dc69d69a4993e349c737f96
2015-04-12Remove the --gen-gdb-info compiler option.David Srbecky
It is never used. We generally use --include-debug-symbols instead. Change-Id: I933495cd85ab4f7dfcf3ef3cd2d943d4b870ffeb
2015-04-02Refactor RelativePatcher out of OatWriter.Vladimir Marko
Move the relative patcher classes to compiler/linker/ and compiler/linker/<arch>/ . Refactor them to avoid OatWriter dependency so that they can be unit tested. Add tests for x86 and x86-64. Change-Id: I1b42baa9fc431378e4cce1399bec590c5b5a409f
2015-03-20Add verify-at-runtime compiler filterMathieu Chartier
Verifies at runtime only, instead of at compilation time. AOSP HH boot time after clean-oat: ~30s instead of ~35s if enabled. Also helps install time if enabled there. TODO: See if there is any possible deadlocks that can result from this. Bug: 19762303 Change-Id: Ibfba77148da9039e8d7d7497c05486bc044eefe7
2015-03-05ART: Add option to abort dex2oat on hard failureAndreas Gampe
Add an option that aborts dex2oat when a hard verifier failure occurs. Bug: 19606409 Change-Id: I53195284e22fe6207274101e85745af763c06271