summaryrefslogtreecommitdiffstats
path: root/runtime/parsed_options.cc
Commit message (Collapse)AuthorAgeFilesLines
* art: Refactor RuntimeOptions/ParsedOptionsIgor Murashkin2015-02-041-718/+418
| | | | | | | | | | | | | 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 some unused cutils/properties.h referencesBrian Carlstrom2015-01-301-4/+0
| | | | | | Also remove an obsolete include workaround Change-Id: Ie17387280285b969c4e9b5334bafde8239b9faf6
* More of the concurrent copying collector.Hiroshi Yamauchi2015-01-231-2/+9
| | | | | Bug: 12687968 Change-Id: I62f70274d47df6d6cab714df95c518b750ce3105
* Follow up on CL 122665.Hiroshi Yamauchi2015-01-131-0/+6
| | | | | | | | | | | | | | | | | | We now do the two-step memory protection strategy (first protect the from space with PROT_READ and later protect it with PROT_NONE) only if the from space is a rosalloc space (excluding the more common bump pointer space case). This strengthens the GC verification for the bump pointer space case as we avoid the case where mutators run while the from space is PROT_READ rather than PROT_NONE. Add a command line flag to override the minimum interval for the hspace compaction for OOM and set it to zero in the gcstress/gcverify run-tests to run the hspace compaction more frequently in tests. Fix some comments. Bug: 18960494 Change-Id: I518b011e026f578e53c4ec269cfb82865b0fae68
* Remove back-door bootclasspath option from RuntimeRichard Uhler2015-01-081-4/+23
| | | | | | | | | | | | | | | | | 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
* Disable HomogeneousSpaceCompact for GSS collectorLin Zang2014-12-121-7/+9
| | | | | | | | HomogeneousSpaceCompact is not suitable when GSS is forground collector. This will fix issue that device can not boot with GSS collecor. Change-Id: Iafdf431c207351571f41bbc9196dff02ba674ab4 Signed-off-by: Lin Zang <lin.zang@intel.com>
* Enable the hspace compaction on OOM by default.Hiroshi Yamauchi2014-11-171-5/+1
| | | | | | | (cherrypick commit d3f228062a1d71ce6ace2f31ecf369ae247633c2) Bug: 18377775 Change-Id: I4a0998c7f35b6418004e92bc07926abc9b74962a
* ART: More warningsAndreas Gampe2014-11-041-15/+15
| | | | | | | Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
* Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.Ian Rogers2014-11-031-1/+1
| | | | | | | | | | | Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
* Tidy up logging.Ian Rogers2014-10-221-3/+2
| | | | | | | | | | | | | | | | | Move gVerboseMethods to CompilerOptions. Now "--verbose-methods=" option to dex2oat rather than runtime argument "-verbose-methods:". Move ToStr and Dumpable out of logging.h, move LogMessageData into logging.cc except for a forward declaration. Remove ConstDumpable as Dump methods are all const (and make this so if not currently true). Make LogSeverity an enum and improve compile time assertions and type checking. Remove log_severity.h that's only used in logging.h. With system headers gone from logging.h, go add to .cc files missing system header includes. Also, make operator new in ValueObject private for compile time instantiation checking. Change-Id: I3228f614500ccc9b14b49c72b9821c8b0db3d641
* Make ART compile with GCC -O0 again.Ian Rogers2014-10-161-3/+3
| | | | | | | | | | | | | Tidy up InstructionSetFeatures so that it has a type hierarchy dependent on architecture. Add to instruction_set_test to warn when InstructionSetFeatures don't agree with ones from system properties, AT_HWCAP and /proc/cpuinfo. Clean-up class linker entry point logic to not return entry points but to test whether the passed code is the particular entrypoint. This works around image trampolines that replicate entrypoints. Bug: 17993736 Change-Id: I5f4b49e88c3b02a79f9bee04f83395146ed7be23
* Enable -Wunreachable-codeIan Rogers2014-09-301-1/+1
| | | | | | | | Caught bugs in DeoptimizeStackVisitor and assemble_x86 SIB encoding. Add UNREACHABLE macro to document code expected to be unreachable. Bug: 17731047 Change-Id: I2e363fe5b38a1246354d98be18c902a6031c0b9e
* Use homogeneous space compact by default if not low memory.Mathieu Chartier2014-09-171-1/+7
| | | | | | | | | | Otherwise we use semispace as the background collector. Bug: 16401001 (cherry picked from commit a33a7fadadc7cb42c83b4aaed01f3a4c126d3075) Change-Id: I6f753f72a05856f31a3e06427abce630231738a3
* Add runtime options for large object spaceMathieu Chartier2014-09-161-1/+31
| | | | | | | | | | | | | | | 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: Fix accidental "1"Andreas Gampe2014-08-291-1/+1
| | | | | | Should have been "0". Change-Id: I9ad3cf1e6be6d0fcf4c8f3700ddeec4e6d5ce167
* ART: Initialize fields of ParsedOptionsAndreas Gampe2014-08-291-78/+80
| | | | | | | 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/+6
|\
| * Support running without a boot image.Alex Light2014-08-251-0/+6
| | | | | | | | | | | | Bug: 17000769 Change-Id: I6404d5050c8a2f4ee6e70d58532eb25ee9de248e
* | Add fallback for non moving space being full.Mathieu Chartier2014-08-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Fix testing wrong variable for non zygote."Mathieu Chartier2014-08-221-4/+0
|\ \
| * | Fix testing wrong variable for non zygote.Mathieu Chartier2014-08-221-4/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | For non zygote we want to only have a single non moving space to let dex2oat use RosAlloc for all allocations. Fixed stale low memory logic in parsed options. Bug: 17189964 (cherry picked from commit a12c2a945fe3f10d3ed31aa5db3e422cc1ad7f98) Change-Id: I4fc00b277db6780ed410eab4cd969e8f004d5348
* | 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
* ART: Relax GetInstructionSetFromStringAndreas Gampe2014-08-201-2/+6
| | | | | | | | | | | | | Do not abort on an unknown instruction set string. Instead return kNone and let the caller handle this. Also simplify the patchoat tool to use this. Bug: 17136416 (cherry picked from commit aabbb2066a715b3fd8e752291f74c6d77b970450) Change-Id: I24131914bcf91c04ae93179bf809a2907f1f2b7a
* 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
* | Use homogeneous space compaction for non low memory devices.Mathieu Chartier2014-08-131-1/+5
| | | | | | | | | | | | | | | | | | | | Saves nearly as much memory without needing the foreground transition. TODO: Pass in these flags from AndroidRuntime.cpp. Bug: 16401001 Change-Id: Iecad0cc0c04fdf9cabe6f9d7f87c761a94b4142c
* | Execute an application even when dex2oat crashes.Nicolas Geoffray2014-08-131-4/+10
|/ | | | | | Bug: 17000769 Change-Id: Iffeb582862a5e794b6c7364c7ec2368cfd0f2214
* ART: Fix wrong command line parameterAndreas Gampe2014-08-081-1/+1
| | | | | Bug: 16843953 Change-Id: I59aea409a5f640a713f839927ba5c37b81e4ce0d
* Get the native bridge library from the framework.Calin Juravle2014-08-081-1/+1
| | | | | | | | Framework now passes the name of the native bridge to the runtime so there's no need to do the reading in libart. Bug: 16843953 Change-Id: I59b5c3050c6e1a37a627a8c98d7085e91487c32c
* Wire up check JNI force copy mode.Ian Rogers2014-08-081-1/+3
| | | | | | | | | | | | 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
* ART: Native bridge command-line parameterAndreas Gampe2014-07-261-0/+4
| | | | | | | | | | | 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/+12
| | | | | | | | | | | | | | 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-80/+1
| | | | | | | This reverts commit 0025a86411145eb7cd4971f9234fc21c7b4aced1. Bug: 16256184 Change-Id: Ie0760a0c293aa3b62e2885398a8c512b7a946a73
* Break apart header files.Ian Rogers2014-07-151-6/+8
| | | | | | | | 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-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+80
| | | | | | | | Broke the build. This reverts commit 7fb36ded9cd5b1d254b63b3091f35c1e6471b90e. Change-Id: I9df0e7446ff0913a0e1276a558b2ccf6c8f4c949
* Revert "Revert "Add implicit null and stack checks for x86""Dave Allison2014-07-101-80/+1
| | | | | | | | | 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
* Revert "Add implicit null and stack checks for x86"Dave Allison2014-07-101-3/+2
| | | | | | | | It breaks cross compilation with x86_64. This reverts commit 34e826ccc80dc1cf7c4c045de6b7f8360d504ccf. Change-Id: I34ba07821fc0a022fda33a7ae21850957bbec5e7
* Add implicit null and stack checks for x86Dave Allison2014-07-091-2/+3
| | | | | | | | | | | This adds compiler and runtime changes for x86 implicit checks. 32 bit only. Both host and target are supported. By default, on the host, the implicit checks are null pointer and stack overflow. Suspend is implemented but not switched on. Change-Id: I88a609e98d6bf32f283eaa4e6ec8bbf8dc1df78a
* Add a new type of profile data in ART profilerWei Jin2014-06-271-3/+8
| | | | | | | | | | | This CL allows the ART profiler to collect bounded stack information that contains only method signature and dex pc on the current stack frames to a bounded depth. The type of the profile data is by default disabled, and can be enabled by setting the option "-Xprofile-type:stack". The bound is controlled by the option "-Xprofile-max-stack-depth:integervalue". Change-Id: Ieab789951018b2263c4d140b40b6c73bffc6a549
* Merge "Add mark compact collector."Mathieu Chartier2014-06-171-0/+2
|\
| * Add mark compact collector.Mathieu Chartier2014-06-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mark compact collector is a 4 phase collection, doing a normal full mark_sweep, calculating forwarding addresses of objects in the from space, updating references of objects in the from space, and moving the objects in the from space. Support is diabled by default since it needs to have non movable classes and field arrays. Performance numbers is around 50% as fast. The main advantage that this has over semispace is that the worst case memory usage is 50% since we only need one space isntead of two. TODO: Make field arrays and classes movable. This causes complication since Object::VisitReferences relies on these, so if we update the fields of an object but another future object uses this object to figure out what fields are reference fields it doesn't work. Bug: 14059466 Change-Id: I661ed3b71ad4dde124ef80312c95696b4a5665a1
* | Add an option to enable collecting dex pc in ART profilerWei Jin2014-06-191-0/+5
|/ | | | | | | | | | This CL allows the ART profiler to collect both method signature and dex pc. The type of the profile data is controlled by the option "-Xprofile-type:{method,dexpc}". To avoid conflicting with the original profile data based on method signatures, the new profile data are stored in files with extension ".pc". Change-Id: I8afb2541d386bff77c5b07fc9367d817a79f58e1
* Enable background compaction by defaultMathieu Chartier2014-06-171-1/+1
| | | | | | Bug: 8981901 Change-Id: I2b1fe8169779268c130b8804961f968e1ba43cda
* Merge "Relax limits for profiler options"Calin Juravle2014-06-101-2/+2
|\
| * Relax limits for profiler optionsCalin Juravle2014-06-111-2/+2
| | | | | | | | | | | | This gives more space for experiments and makes debugging easier. Change-Id: I16b07746098ab2bd6a321d762a80cfea3f7a725d
* | Reduce header files including header files.Ian Rogers2014-06-061-1/+4
|/ | | | | | Main focus is getting heap.h out of runtime.h. Change-Id: I8d13dce8512816db2820a27b24f5866cc871a04b
* Merge "Fixed and refactored profiler options handling"Calin Juravle2014-06-061-13/+20
|\
| * Fixed and refactored profiler options handlingCalin Juravle2014-06-061-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Switch on implicit checks and bump oat version to force recompilationDave Allison2014-05-301-1/+1
|/ | | | | | | This switches on the compiler's implicit null pointer and stack overflow checks. These use signals Change-Id: I7b536784bbca5f07e30379881a1eea6ab4c258ac