summaryrefslogtreecommitdiffstats
path: root/runtime/parsed_options.h
Commit message (Collapse)AuthorAgeFilesLines
* art: Refactor RuntimeOptions/ParsedOptionsIgor Murashkin2015-02-041-75/+22
| | | | | | | | | | | | | Refactor the RuntimeOptions to be a type-safe map (VariantMap, see runtime_options.h) and the ParsedOptions to delegate the parsing to CmdlineParser (see cmdline/cmdline_parser.h). This is the start of a command line parsing refactor, and may include more in the future (dex2oat, patchoat, etc). For more details of the command line parsing generator usage see cmdline/README.md Change-Id: Ic67c6bca5e1f33bf2ec60e2e3ff8c366bab91563
* Remove back-door bootclasspath option from RuntimeRichard Uhler2015-01-081-1/+1
| | | | | | | | | | | | | | | | | The 'bootclasspath' option allowed users of the Runtime to load their own boot class path DexFiles and pass them directly to the Runtime as an option. This obscures the fact that the Runtime must take ownership of the boot class path DexFiles. This change removes the use of the bootclasspath option by dex2oat and the common runtime tests. For dex2oat, we use the existing -Xbootclasspath option instead, and introduce a new -Xbootclasspath-locations option to override the dex locations for the loaded boot class path dex files. For the common runtime tests, we simply use -Xbootclasspath. Bug: 18809837 Change-Id: Idfcd4885390bf0f3dc350993756dd337220def73
* Instruction set features for ARM64, MIPS and X86.Ian Rogers2014-11-131-1/+1
| | | | | | | | | | | | | Also, refactor how feature strings are handled so they are additive or subtractive. Make MIPS have features for FPU 32-bit and MIPS v2. Use in the quick compiler rather than #ifdefs that wouldn't have worked in cross-compilation. Add SIMD features for x86/x86-64 proposed in: https://android-review.googlesource.com/#/c/112370/ Bug: 18056890 Change-Id: Ic88ff84a714926bd277beb74a430c5c7d5ed7666
* Add runtime options for large object spaceMathieu Chartier2014-09-161-0/+3
| | | | | | | | | | | | | | | Adds the two following options: Option -XX:LargeObjectSpace={freelist, map, disabled} Option -XX:LargeObjectThreshold=size specifies the size for which primitive arrays are allocated in the large object space. Added handling for large object space == null in collectors. Fixed an error in the mem map space where we didn't use the page aligned size LOS for bytes allocated, this resutled in heaps appearing a bit smaller than they should be. Change-Id: I6f17c3534b59e7dc68cd375153e7a846799b3da4
* ART: Initialize fields of ParsedOptionsAndreas Gampe2014-08-291-1/+1
| | | | | | | Avoids certain paths where we touched uninitialized fields. Bug: 17330858 Change-Id: Ia68161b12eefefacad6fc524f487f8e2caf6342a
* Merge "Support running without a boot image."Brian Carlstrom2014-08-251-0/+1
|\
| * Support running without a boot image.Alex Light2014-08-251-0/+1
| | | | | | | | | | | | Bug: 17000769 Change-Id: I6404d5050c8a2f4ee6e70d58532eb25ee9de248e
* | Add fallback for non moving space being full.Mathieu Chartier2014-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the non moving space becomes full, we disable moving GC and make the main space the new non moving space. Also added a runtime option for changing the non moving space size: -XX:NonMovingSpaceCapacity. Bug: 17189964 (cherry picked from commit 4c5a469683e433f126c9863cd393747d2e7c4a29) Change-Id: If82e3c6f8a0f389e37e14a0b1e6d5126d571fd7a
* | Always setup the native bridge libraryCalin Juravle2014-08-221-1/+1
|/ | | | | | | | | | | | | | | ... even if the string is empty. This will initialize the native bridge library but mark it as unavailable. - also, rename native_bridge_library_path to native_bridge_library_filename to be closer to the actual meaning (it's just the filename without any path). Bug: 16404669 (cherry picked from commit I94628639691459d48d1fbf0841f36b68d51818e7) Change-Id: I94628639691459d48d1fbf0841f36b68d51818e7
* Merge "[ART] Move to system/core native bridge library"Calin Juravle2014-08-151-1/+1
|\
| * [ART] Move to system/core native bridge libraryCalin Juravle2014-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | Some cleanups on the way: - move NativeBridgeRuntimeCallbacks from a global to a field - rename native_bridge_library_string to the more suggestive navtive_bridge_library_path - clean up imports Bug: 16884833 Change-Id: I73aab8e212860ba5aee9444d801806d3da326a41
* | Execute an application even when dex2oat crashes.Nicolas Geoffray2014-08-131-0/+1
|/ | | | | | Bug: 17000769 Change-Id: Iffeb582862a5e794b6c7364c7ec2368cfd0f2214
* Wire up check JNI force copy mode.Ian Rogers2014-08-081-0/+1
| | | | | | | | | | | | Increase check JNI checks. Break apart jni_internal.h in to jni_env_ext.h and java_vm_ext.h. Fix the abuse of ScopedObjectAccess/annotalysis by ScopedCheck in the case of VM routines. Make class loader override and shared library class loader JNI global references rather than mirror pointers. Clean-ups to native bridge. Change-Id: If7c6110b5aade7a402bfb67534af86a7b2cdeb55
* Make system use patchoat to relocate during runtime.Alex Light2014-08-051-2/+0
| | | | | | | | | | Change dalvik_system_DexFile.cc so that isDexOptNeededInternal will be able to indicate that a patchoat is required. Change default of relocate option to be on. Bug: 15358152 Change-Id: Ibe92d8b55a24bbf718b0416a21b76e5df7a2de26
* ART: Native bridge command-line parameterAndreas Gampe2014-07-261-0/+1
| | | | | | | | | | | Add a command-line parameter for the native bridge library, slight refactor/cleanup. Add run-test 115 to test the native bridge interface. Currently the tests are black-listed for the target, as the setup for the test is too complicated in the current infrastructure. Change-Id: I6ccf19485e8c30b96e9f2fd5425278cb1ebd403f
* Runtime can now be set to require relocationAlex Light2014-07-221-0/+4
| | | | | | | | | | | | | | Add a pair of runtime flags -Xrelocate and -Xnorelocate that can force the runtime to require that all files that are run are relocated, to prevent attacks based on the known art base address. Add support for running patchoat on oat files compiled without an image. Change run-test to have new --prebuild and --relocate flags. Bug: 15358152 Change-Id: I91166c62dd1ab80e5cbcb7883a2cd0d56afca32d
* Revert "Revert "Revert "Revert "Add implicit null and stack checks for x86""""Dave Allison2014-07-161-4/+0
| | | | | | | This reverts commit 0025a86411145eb7cd4971f9234fc21c7b4aced1. Bug: 16256184 Change-Id: Ie0760a0c293aa3b62e2885398a8c512b7a946a73
* Break apart header files.Ian Rogers2014-07-151-5/+14
| | | | | | | | Create libart-gtest for common runtime and compiler gtest routines. Rename CompilerCallbacksImpl that is quick compiler specific. Rename trace clock source constants to not use the overloaded profiler term. Change-Id: I4aac4bdc7e7850c68335f81e59a390133b54e933
* ART: Compacting ROS/DlMalloc spaces with semispace copy GCZuo Wang2014-07-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current semispace copy GC is mainly associated with bump pointer spaces. Though it squeezes fragmentation most aggressively, an extra copy is required to re-establish the data in the ROS/DlMalloc space to allow CMS GCs to happen afterwards. As semispace copy GC is still stop-the-world, this not only introduces unnecessary overheads but also longer response time. Response time indicates the time duration between the start of transition request and the start of transition animation, which may impact the user experience. Using semispace copy GC to compact the data in a ROS space to another ROS(or DlMalloc space to another DlMalloc) space solves this problem. Although it squeezes less fragmentation, CMS GCs can run immediately after the compaction. We apply this algorithm in two cases: 1) Right before throwing an OOM if -XX:EnableHSpaceCompactForOOM is passed in as true. 2) When app is switched to background if the -XX:BackgroundGC option has value HSpaceCompact. For case 1), OOMs are significantly delayed in the harmony GC stress test, with compaction ratio up to 0.87. For case 2), compaction ratio around 0.5 is observed in both built-in SMS and browser. Similar results have been obtained on other apps as well. Change-Id: Iad9eabc6d046659fda3535ae20f21bc31f89ded3 Signed-off-by: Wang, Zuo <zuo.wang@intel.com> Signed-off-by: Chang, Yang <yang.chang@intel.com> Signed-off-by: Lei Li <lei.l.li@intel.com> Signed-off-by: Lin Zang <lin.zang@intel.com>
* Revert "Revert "Revert "Add implicit null and stack checks for x86"""Nicolas Geoffray2014-07-111-0/+5
| | | | | | | | Broke the build. This reverts commit 7fb36ded9cd5b1d254b63b3091f35c1e6471b90e. Change-Id: I9df0e7446ff0913a0e1276a558b2ccf6c8f4c949
* Revert "Revert "Add implicit null and stack checks for x86""Dave Allison2014-07-101-5/+0
| | | | | | | | | Fixes x86_64 cross compile issue. Removes command line options and property to set implicit checks - this is hard coded now. This reverts commit 3d14eb620716e92c21c4d2c2d11a95be53319791. Change-Id: I5404473b5aaf1a9c68b7181f5952cb174d93a90d
* Reduce header files including header files.Ian Rogers2014-06-061-0/+1
| | | | | | Main focus is getting heap.h out of runtime.h. Change-Id: I8d13dce8512816db2820a27b24f5866cc871a04b
* Fixed and refactored profiler options handlingCalin Juravle2014-06-061-6/+1
| | | | | | | | | | | | | - extracted profiler options in a separate class - switched from system property reading to command line arguments - added profile based compilation options to CompilerOptions - removed no longer used kProfile compilation filter - optimize dex files only if the profiler is enabled - clean up unused arguments Bug: 12877748 Bug: 15275634 Change-Id: I37ff68e7694370950ce8db2360562e9058ecebb7
* Add option to specify compiler executable.Tsu Chiang Chuang2014-05-271-0/+1
| | | | Change-Id: I973da5e74be5a62461caacbc708288fb95e1b99b
* Use instruction specific dalvik cache dirs.Narayan Kamath2014-05-011-0/+1
| | | | | | | | | | | | - All oat & art files are now placed under /data/dalvik-cache/<isa>/. - GetDalvikCacheOrDie now requires a mandatory subdirectory argument, and is implicitly rooted under /data/. - Added helper methods to convert InstructionSet enums into strings and vice versa. (cherry picked from commit 2974bc3d8a5d161d449dd66826d668d87bdc3cbe) Change-Id: Ic7986938e6a7091a2af675ebafec768f7b5fb8cd
* Enable concurrent sweeping for non-concurrent GC.Mathieu Chartier2014-04-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the GarbageCollector to let all of the phases be run by the collector's RunPhases virtual method. This lets the GC decide which phases should be concurrent and reduces how much baked in GC logic resides in GarbageCollector. Enabled concurrent sweeping in the semi space and non concurrent mark sweep GCs. Changed the semi-space collector to have a swap semi spaces boolean which can be changed with a setter. Fixed tests to pass with GSS collector, there was an error related to the large object space limit. Before (EvaluateAndApplyChanges): GSS paused GC time 7.81s/7.81s, score: 3920 After (EvaluateAndApplyChanges): GSS paused GC time 6.94s/7.71s, score: 3900 Benchmark score doesn't go up since the GC happens in the allocating thread. There is a slight reduction in pause times experienced by other threads (0.8s total). Added options for pre sweeping GC heap verification and pre sweeping rosalloc verification. Bug: 14226004 Bug: 14250892 Bug: 14386356 Change-Id: Ib557d0590c1ed82a639d0f0281ba67cf8cae938c
* Decrease target utilization for foreground apps.Mathieu Chartier2014-04-161-0/+1
| | | | | | | | | | GC time in FormulaEvaluationActions.EvaluateAndApplyChanges goes from 26.1s to 23.2s. Benchmark score goes down ~50 in FormulaEvaluationActions.EvaluateAndApplyChanges, and up ~50 in GenericCalcActions.MemAllocTest. Bug: 8788501 Change-Id: I412af1205f8b67e70a12237c990231ea62167bc0
* Profile: made startImmediately settableCalin Juravle2014-04-071-0/+1
| | | | | | | | By default the profiler starts immediately upon app startup. To delay the startup by some random offset use -Xprofile-start_lazy. Bug: 12877748 Change-Id: Ifc1bb7f79f9f9aa53204b2fb1fbae3cd5c780cac
* Add support for -Xverify:none mode.Jeff Hao2014-04-021-0/+1
| | | | | | | This mode skips all verification and compilation. Public bug: https://code.google.com/p/android/issues/detail?id=67664 Change-Id: Idd00ab8e9e46d129c02988b063c41a507e07bf5b
* Implicit null/suspend checks (oat version bump)Dave Allison2014-03-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to use SEGV signals to throw NullPointerException exceptions from Java code rather than having the compiler generate explicit comparisons and branches. It does this by using sigaction to trap SIGSEGV and when triggered makes sure it's in compiled code and if so, sets the return address to the entry point to throw the exception. It also uses this signal mechanism to determine whether to check for thread suspension. Instead of the compiler generating calls to a function to check for threads being suspended, the compiler will now load indirect via an address in the TLS area. To trigger a suspend, the contents of this address are changed from something valid to 0. A SIGSEGV will occur and the handler will check for a valid instruction pattern before invoking the thread suspension check code. If a user program taps SIGSEGV it will prevent our signal handler working. This will cause a failure in the runtime. There are two signal handlers at present. You can control them individually using the flags -implicit-checks: on the runtime command line. This takes a string parameter, a comma separated set of strings. Each can be one of: none switch off null null pointer checks suspend suspend checks all all checks So to switch only suspend checks on, pass: -implicit-checks:suspend There is also -explicit-checks to provide the reverse once we change the default. For dalvikvm, pass --runtime-arg -implicit-checks:foo,bar The default is -implicit-checks:none There is also a property 'dalvik.vm.implicit_checks' whose value is the same string as the command option. The default is 'none'. For example to switch on null checks using the option: setprop dalvik.vm.implicit_checks null It only works for ARM right now. Bumps OAT version number due to change to Thread offsets. Bug: 13121132 Change-Id: If743849138162f3c7c44a523247e413785677370
* Size and offset fixes to compile for 64b hostAndreas Gampe2014-03-051-7/+7
| | | | | | | Some Runtime fields have moved after deletion of other fields. ParsedOptions uses size_t, but parsing function works on unsigned int. Change-Id: I6b7f25787af5d3f9e38554abea2bfb220299f475
* Remove oat file location in the image.Nicolas Geoffray2014-03-041-1/+0
| | | | | | | | | The oat file is now always in the same directory, and has the same name as the image file. Only difference is the extension. This also removes the need for host-prefix. Change-Id: I16d1f7aeb1d58372d41921694664e9c321afc1ad
* Add ART -help and -showversionBrian Carlstrom2014-03-031-0/+105
Bug: https://code.google.com/p/android/issues/detail?id=62149 Change-Id: I5c21c0433f5f341f94e7d977e8d2d69cc46d6fe3