summaryrefslogtreecommitdiffstats
path: root/dex2oat
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-081-25/+38
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/art into HEAD Android 6.0.1 release 3 Change-Id: I23fd56f2c1a3e8e8b993a151a794e18f3569912e
| * ART: Decrease dex2oat watchdog timeoutAndreas Gampe2015-10-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Keep the dex2oat watchdog timeout lower than the package manager timeout, so that dex2oat kills itself before the system server watchdog kills the system because of the long installation. Bug: 23629410 (cherry picked from commit 540138ae55ac1909606a436d7f52e20146c56657) Change-Id: I425b19ab305cfaa43f6bddc3a892be892acaf513
| * ART: Clean up less in dex2oatAndreas Gampe2015-09-281-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In non-debug builds, clean up even less. We already did not shut down the runtime. Also skipping the compiler driver and the verification results removes all major points of destructor performance. Tested with a common large app on Nexus 9. Time between dex2oat timing message and executable exit (log from immediately-after log echo) [w/o swap, w/ swap]. Before: 2.409s / 48.774s After: 0.132s / 0.188s Bug: 24199200 Change-Id: I5d8c17f8e28796545cfbb3887c07c92905f9b48d (cherry picked from commit 3f30e1219dd76f78bb9b6504e696a04a3dfae564)
* | dex2oat: Increase timeout to allow slow CPUs to finish compilationDmitry Grinberg2015-11-071-2/+2
| | | | | | | | Change-Id: Ib9f19e0acf1a0a5b90d8b7ef2a0daf224cb2aec1
* | ART: Tuning compiler thread count for application runtimeChitti Babu Theegala2015-10-062-0/+19
|/ | | | | | | | | | | | dex2oat decides the number of compiler threads to be spawned based on the number of cores in the system. Using this max possible compiler threads causes over parallelization on some platforms and there by leads to longer install times. Reducing to fewer threads on these platforms, improves this time by 60% to 100%. Some APPs will call dex2oat at the first launch time(runtime). The thread count tuning is needed for such scenario. Change-Id: Id3a545f0300f93397627beeb697a7b7cfd912d52
* Tighten default inlining settings when using the space filter.Roland Levillain2015-08-071-3/+24
| | | | | | | | (cherry picked from commit a215b95d03cfe713018a245553b74d7eeee813df and amended) Bug: 21868508 Change-Id: Ic83813a966cef18e59447083926bf033aa587154
* Allow for fine tuning the inliner.Calin Juravle2015-07-301-0/+32
| | | | | | | | | | Bug: 21868508 (cherry picked and squashed from commits ec74835a7e4f2660250a2f3f9508cbbe5269e49a and 0941b9d48a9a8c6d80a1af7a0d0fc9f80fe2b9a1) Change-Id: I1750e6bea20321d04680132281a6c2924531c5ae
* Add implicit null pointer and stack overflow checks for Mips.Douglas Leung2015-07-031-0/+2
| | | | | | | (cherry picked from commit 22bb5a2ebc1e2724179faf4660b2735dcb185f21) Bug: 21555893 Change-Id: I2a995be128a5603d08753c14956dd8c8240ac63c
* ART: Unlink target oat file before compilingAndreas Gampe2015-06-301-0/+4
| | | | | | | | | Dex2oat must create a new file (new inode) when writing to a target given by name, as the existing file may be in use. So unlink any existing file first. Bug: 22047255 Change-Id: Ief942c71564076e39c1e8340d5c4c55286f75896
* ART: Only print stripped dex2oat command lineAndreas Gampe2015-06-251-1/+68
| | | | | | | | | | | To curb logcat noise, strip many dex2oat parameters from the logcat printout. Bug: 20501758 (cherry picked from commit 046c706707ea0f16c804136e237ac7cbfdc897a1) Change-Id: Ifc367f91f593916e0773af1ca950c798f129889f
* ART stack unwinding fixes for libunwind/gdb/lldb.David Srbecky2015-06-191-25/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dex2oat can already generate unwinding and symbol information which allows tools to create backtrace of mixed native and Java code. This is a cherry pick from aosp/master which fixes several issues. Most notably: * It enables generation of ELF-64 on 64-bit systems (in dex2oat, C compilers already produce ELF-64). Libunwind requires ELF-64 on 64-bit systems for backtraces to work. * It enables loading of ELF files with dlopen. This is required for libunwind to be able to generate backtrace of current process (i.e. the process requesting backtrace of itself). * It adds unit test to test the above (32 vs 64 bit, in-proces vs out-of-process, application code vs framework code). * Some other fixes or clean-ups which should not be of much significance but which are easier to include to make the important CLs cherry-pick cleanly. This is squash of the following commits from aosp/master: 7381010 ART: CFI Test e1bbed2 ART: Blacklist CFI test for non-compiled run-tests aab9f73 ART: Blacklist CFI test for JIT 4437219 ART: Blacklist CFI test for Heap Poisoning a3a49fe Switch to using ELF-64 for 64-bit architectures. 297ed22 Write 64-bit address in DWARF if we are on 64-bit architecture. 24981a1 Set correct size of PT_PHDR ELF segment. 1a146bf Link .dynamic to .dynstr 67a0653 Make some parts of ELF more (pointer) aligned. f50fa82 Enable 64-bit CFI tests. 49e1fab Use dlopen to load oat files. 5dedb80 Add more logging output for dlopen. aa03870 Find the dlopened file using address rather than file path. 82e73dc Release dummy MemMaps corresponding to dlopen. 5c40961 Test that we can unwind framework code. 020c543 Add more log output to the CFI test. 88da3b0 ART: Fix CFI test wrt/ PIC a70e5b9 CFI test: kill the other process in native code. ad5fa8c Support generation of CFI in .debug_frame format. 90688ae Fix build - large frame size of ElfWriterQuick<ElfTypes>::Write. 97dabb7 Fix build breakage in dwarf_test. 388d286 Generate just single ARM mapping symbol. f898087 Split .oat_patches to multiple sections. 491a7fe Fix build - large frame size of ElfWriterQuick<ElfTypes>::Write (again). 8363c77 Add --generate-debug-info flag and remove the other two flags. 461d72a Generate debug info for core.oat files. Bug: 21924613 Change-Id: I3f944a08dd2ed1df4d8a807da4fee423fdd35eb7
* Move mirror::ArtMethod to nativeMathieu Chartier2015-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 (cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d Fix some ArtMethod related bugs Added root visiting for runtime methods, not currently required since the GcRoots in these methods are null. Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes --trace run-tests 005, 044. Fixed optimizing compiler bug where we used a normal stack location instead of double on ARM64, this fixes the debuggable tests. TODO: Fix JDWP tests. Bug: 19264997 Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3 ART: Fix casts for 64-bit pointers on 32-bit compiler. Bug: 19264997 Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457 Fix JDWP tests after ArtMethod change Fixes Throwable::GetStackDepth for exception event detection after internal stack trace representation change. Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of proxy method. Bug: 19264997 Change-Id: I363e293796848c3ec491c963813f62d868da44d2 Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0 Fix bogus image test assert Previously we were comparing the size of the non moving space to size of the image file. Now we properly compare the size of the image space against the size of the image file. Bug: 19264997 Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a [MIPS64] Fix art_quick_invoke_stub argument offsets. ArtMethod reference's size got bigger, so we need to move other args and leave enough space for ArtMethod* and 'this' pointer. This fixes mips64 boot. Bug: 19264997 Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
* ART: Clean up arm64 kNumberOfXRegisters usage.Vladimir Marko2015-05-261-0/+1
| | | | | | | | | | | | | | | | | | | | | Avoid undefined behavior for arm64 stemming from 1u << 32 in loops with upper bound kNumberOfXRegisters. Create iterators for enumerating bits in an integer either from high to low or from low to high and use them for <arch>Context::FillCalleeSaves() on all architectures. Refactor runtime/utils.{h,cc} by moving all bit-fiddling functions to runtime/base/bit_utils.{h,cc} (together with the new bit iterators) and all time-related functions to runtime/base/time_utils.{h,cc}. Improve test coverage and fix some corner cases for the bit-fiddling functions. Bug: 13925192 (cherry picked from commit 80afd02024d20e60b197d3adfbb43cc303cf29e0) Change-Id: I905257a21de90b5860ebe1e39563758f721eab82
* ART: Refactor UnstartedRuntime for testingAndreas Gampe2015-05-211-1/+1
| | | | | | | | | | | | Expose the UnstartedRuntime implementation functions as private static methods of a class. Add a gtest that can invoke these functions. Add sample tests for String and Memory. Bug: 21173514 (cherry picked from commit 799681b176ad25437ce2849639f54f610dcbf684) Change-Id: Ib5bde6347fafaf7607c642542ea7d5938ff4b1df
* Fix debuggable compiler flag detection for secondary dex filesSebastien Hertz2015-05-191-1/+4
| | | | | | | | | | | | | | | | | | Compiles secondary dex files like the primary dex file: if it has been compiled with the --debuggable flag, compile secondary dex files with the --debuggable flag too. Therefore, dex files loaded at runtime are compiled the same way as dex files compiled at install time on the classpath (excluding the boot image that is not compiled debuggable). Also adds debuggable key in the oat header and bump the oat version. Bug: 20944228 (cherry picked from commit 0de1133ba600f299b3d67938f650720d9f859eb2) Change-Id: If6b2236e7fe547cc421f57b573043748018d3ae0
* ART: Emit debug info when app is debuggableAndreas Gampe2015-05-041-0/+2
| | | | | | | | Emit debug symbols and CFI when dex2oat is compiling with the --debuggable flag. Bug: 17011129 Change-Id: I0afab1e46abd819eded2b823580e766619497393
* ART: Move dex2oat watchdog output to LogLineAndreas Gampe2015-04-281-19/+12
| | | | | | | | | | | | | The fprintf isn't visible on device, as it doesn't end up in the logcat. Also increase the watchdog timeout to 10 minutes. Bug: 20658562 (cherry picked from commit d687e375cf7507b5c36df63cf03c991038b1c218) Change-Id: I1fec8dae25f9282f72e762bda934fceb948bbd5f
* ART: Do not log non-swap usageAndreas Gampe2015-04-241-2/+2
| | | | | | | Reduce logcat noise. Bug: 20501758 Change-Id: I5cbc28614d4be9e7fd120b7ccb97ca489e341f54
* Replace NULL with nullptrMathieu Chartier2015-04-221-2/+2
| | | | | | | Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
* ART: Add compiled-methodsAndreas Gampe2015-04-211-38/+95
| | | | | | | | | | | Add a dex2oat option for compiled-methods, a more granular filter than compiled-classes. Add compiler-driver support for it. Refactor dex2oat to reuse file reading. Add a test to oat_test. Change-Id: I78d0d040bce7738b4bb7aabe7768b5788d2587ac
* ART: Change image_classes and compiled_classes to unordered setAndreas Gampe2015-04-201-10/+14
| | | | | | | | These lists can be large, and the soon-to-follow compiled_methods will be potentially even larger. Use a hash set instead of a tree set. Change-Id: I7d25c075540f47771354c6f49928b4fd0c76eb2e
* ART: Store classpath information into oat fileAndreas Gampe2015-04-141-0/+5
| | | | | | | | | | | Store a "dependency list" of class-path dex-files into the key-value store of an oat file. The list is made up of dex locations and corresponding checksums. Add tests for encoding, decoding and checking the list. Bug: 19781184 Change-Id: Ie700dd37e6e086db599c95d329ac1f1d2ff0b758
* Add --include-cfi compiler option.David Srbecky2015-04-131-0/+11
| | | | | | | | | | | | 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
* Merge "Remove the --gen-gdb-info compiler option."David Srbecky2015-04-131-9/+0
|\
| * Remove the --gen-gdb-info compiler option.David Srbecky2015-04-121-9/+0
| | | | | | | | | | | | It is never used. We generally use --include-debug-symbols instead. Change-Id: I933495cd85ab4f7dfcf3ef3cd2d943d4b870ffeb
* | Merge "Remove duplicated dex2oat usage message"Nicolas Geoffray2015-04-131-5/+0
|\ \
| * | Remove duplicated dex2oat usage messageSnowcat84362015-04-131-5/+0
| | | | | | | | | | | | | | | | | | | | | Because '--huge-method-max' usage message is duplicated, Remove duplicated dex2oat usage message. Change-Id: I91cef8319d7292e4977eba49dfcb8cc2cd9ac1bf
* | | Merge "ART: Adds a help message for parallel compilation"Nicolas Geoffray2015-04-131-0/+5
|\ \ \ | |_|/ |/| |
| * | ART: Adds a help message for parallel compilationJean-Philippe Halimi2015-03-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds a message for the "j" option of dex2oat in order to explicit its usage. Change-Id: I5a50e52b38f579f9956ad92a7daaf77bfa4c893f Signed-off-by: Jean-Philippe Halimi <jean-philippe.halimi@intel.com>
* | | ART: Use canonical location in dex2oatAndreas Gampe2015-04-091-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | To filter class-path dex files, use the canonical location, not the location. That will correctly resolve relative vs absolute paths. Bug: 20133593 Change-Id: I894656cb6bef75cdaffb188987af0a3647c74ad6
* | | Merge "Host dex2oat and patchoat require libcutils."Richard Uhler2015-03-311-2/+2
|\ \ \
| * | | Host dex2oat and patchoat require libcutils.Richard Uhler2015-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When atrace_* functions are defined for both target and host, host dex2oat and patchoat require libcutils. Change-Id: I89397e83986686a2b6a6f245c25017eb379081b1
* | | | ART: Some runtime cleanupAndreas Gampe2015-03-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an enum for the compiler-callback mode. Refactor and remove some unnecessary includes in runtime.h. Change-Id: If2245fa470171311b8e05b677cf6bb28f209585a
* | | | ART: PathClassLoader for compilerAndreas Gampe2015-03-271-10/+9
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an actual PathClassLoader when compiling apps, instead of a side structure and cutout. This CL sets up a minimal object 'cluster' that recreates the Java side of a regular ClassLoader such that the Class-Linker will recognize it and use the internal native fast-path. This CL removes the now unnecessary compile-time-classpath and replaces it with a single 'compiling-the-boot-image' flag in the compiler callbacks. Note: This functionality is *only* intended for the compiler, as the objects have not been completely initialized. Bug: 19781184 Change-Id: I7f36af12dd7852d21281110a25c119e8c0669c1d
* | | Merge "Implement a space filter for optimizing."Nicolas Geoffray2015-03-231-1/+0
|\ \ \
| * | | Implement a space filter for optimizing.Nicolas Geoffray2015-03-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Heuristic-based. Currently only for enabling fugu user build. Change-Id: I76e652bd3f00ed84a2a8ad69c7c2c0e24d74cd68
* | | | Merge "Improve dex2oat --dex-file and --dex-location usage info."Richard Uhler2015-03-231-1/+6
|\ \ \ \ | |/ / / |/| | |
| * | | Improve dex2oat --dex-file and --dex-location usage info.Richard Uhler2015-03-181-1/+6
| | | | | | | | | | | | | | | | Change-Id: I8cb2070149ad9fdcf01d773abb1547811999772f
* | | | ART: Add Mips32r6 backend supportDouglas Leung2015-03-201-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Mips32r6 compiler support. Don't use deprecated Mips32r2 instructions if running in Mips32r6 mode. Change-Id: I54e689aa8c026ccb75c4af515aa2794f471c9f67
* | | | Add verify-at-runtime compiler filterMathieu Chartier2015-03-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Revert "Revert "Use optimizing for apps.""Nicolas Geoffray2015-03-201-1/+10
| |/ / |/| | | | | | | | | | | | | | This reverts commit 706cae36209932f258b2fe2e396f31d2dd7d585e. Change-Id: I75cc6206ec17ade52a6db0737b62aa37ea2fa300
* | | Revert "Use optimizing for apps."Nicolas Geoffray2015-03-191-10/+1
| | | | | | | | | | | | | | | | | | This reverts commit f3251d12dfa387493dbde4c4148a633802f5f7e3. Change-Id: I32514e10ece55ee7bd7382ce2e956d57c9b621e5
* | | Use optimizing for apps.Nicolas Geoffray2015-03-171-1/+10
|/ / | | | | | | | | | | Doing it in dex2oat, to avoid messing up with our current testing. Change-Id: I76c58f11f0d4756b894e797fc52712453e35adb1
* | ART: Refactor unstarted runtimeAndreas Gampe2015-03-111-0/+7
| | | | | | | | | | | | | | Refactor and clean up unstarted runtime. Bug: 19542228 Change-Id: Ib3e4b3517e06e8242d4fed32ca59419fef553a47
* | Merge "Initial support for quick compiler on MIPS64r6."Andreas Gampe2015-03-061-4/+1
|\ \
| * | Initial support for quick compiler on MIPS64r6.Maja Gagic2015-03-061-4/+1
| | | | | | | | | | | | Change-Id: I6f43027b84e4a98ea320cddb972d9cf39bf7c4f8
* | | Do not dump memory usage if driver was never createdBrian Carlstrom2015-03-061-1/+2
|/ / | | | | | | | | Bug: https://code.google.com/p/android/issues/detail?id=158593 Change-Id: I8084f9ac823910aa11f854f3e764240741fbf0d5
* | ART: Add option to abort dex2oat on hard failureAndreas Gampe2015-03-051-1/+5
| | | | | | | | | | | | | | Add an option that aborts dex2oat when a hard verifier failure occurs. Bug: 19606409 Change-Id: I53195284e22fe6207274101e85745af763c06271
* | Merge "ART: Add debuggable compiler flag"Andreas Gampe2015-03-041-0/+8
|\ \ | |/ |/|
| * ART: Add debuggable compiler flagAndreas Gampe2015-03-041-0/+8
| | | | | | | | | | | | Add a flag to compiler options that shows debuggability. Change-Id: Id17ec72babe2ee88713a0d274eff86508de30666