summaryrefslogtreecommitdiffstats
path: root/runtime/parsed_options.cc
Commit message (Collapse)AuthorAgeFilesLines
* Replace NULL with nullptrMathieu Chartier2015-04-221-3/+3
| | | | | | | Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
* Merge "Disable parallel GC by default"Mathieu Chartier2015-04-161-2/+2
|\
| * Disable parallel GC by defaultMathieu Chartier2015-04-151-2/+2
| | | | | | | | | | | | | | | | Not using parallel GC seems to reduce avg pauses by ~0.1s on EvaluateAndApplyChanges. Avoiding creating the thread pool should help app launch slightly and reduce memory ussage. Change-Id: Iebec2a17701c76e4145b41d7c0b4f6dd17806efa
* | ART: Streaming trace modeAndreas Gampe2015-04-151-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Add a streaming mode for tracing. Streaming uses a buffer of 16KB and writes to the output when that buffer gets full. Streaming mode can be enabled with -Xmethod-trace-stream and is currently not exposed otherwise. Add a python script that can parse the streaming format, which simply contains strings for newly encountered threads and methods inline, and create output that can be used with traceview. Add Trace::Pause and Trace::Abort, which can pause and abort tracing. Abort is different from Stop in that it does not write the data. Add code to the zygote hooks JNI implementation that pauses tracing before the fork, making sure that a child cannot clobber the parent's data. Add code to the zygote hooks JNI implementation that aborts old tracing and starts new tracing in the child after the fork. Currently base the output on the pid. This will not work on an unmodified device, as the profiles directory is not generally writable, but we do not have enough information at that point. Consider a scheme that restarts tracing later. Change-Id: I93c7bf87e35af582bdfdd3ecc7c52454514220dd
* ART: Enable more Clang warningsAndreas Gampe2015-04-061-1/+0
| | | | Change-Id: Ie6aba02f4223b1de02530e1515c63505f37e184c
* ART: Set default prune counter to 10Andreas Gampe2015-03-311-1/+1
| | | | | | | By default, prune cache at boot after ten failed boots. Bug: 19983101 Change-Id: Ib88f807e0082d71292c14c7af38e02cca5a5602c
* Add paths to apk!lib/<abi> to LD_LIBRARY_PATHDmitriy Ivanov2015-03-231-0/+3
| | | | | | | | Add paths to .apk to LD_LIBRARY_PATH to enable bionic linker's "open from zip-file" feature. Bug: 8076853 Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
* Add way to print JIT related info at shutdownMathieu Chartier2015-03-091-0/+3
| | | | | | | | | | | | | | | | | | | Added a runtime option called -XX:DumpJITInfoOnShutdown with prints various interesting JIT statistics during the shutdown of the runtime if enabled. Example of running EvaluateAndApplyChanges with the option: I art : Code cache size=427KB data cache size=84KB num methods=1598 I art : Start Dumping histograms for 1598 iterations for JIT timings I art : Compiling: Sum: 727.850ms 99% C.I. 135us-4402us Avg: 455.475us Max: 15567us I art : Verifying: Sum: 191.074ms 99% C.I. 19us-1450.500us Avg: 119.570us Max: 5142us I art : TrimMaps: Sum: 62.053ms 99% C.I. 13us-199.374us Avg: 38.831us Max: 10058us I art : MakeExecutable: Sum: 11.153ms 99% C.I. 4us-47us Avg: 6.979us Max: 47us I art : Initializing: Sum: 7.991ms 99% C.I. 1us-49.781us Avg: 5us Max: 4852us I art : Done Dumping histograms Bug: 17950037 Change-Id: I23538b24f947e5f6934f55579b8baa9d806eb3d5
* Rename -Xjit / -Xnojit options to -Xusejit:<boolean>Mathieu Chartier2015-03-051-4/+4
| | | | | Bug: 17950037 Change-Id: I9182820240c8bbc2fa4767f6361ab3b7f1083a31
* Revert "Revert "Add JIT""Mathieu Chartier2015-02-241-17/+29
| | | | | | | | Added missing EntryPointToCodePointer. This reverts commit a5ca888d715cd0c6c421313211caa1928be3e399. Change-Id: Ia74df0ef3a7babbdcb0466fd24da28e304e3f5af
* Merge "Revert "Add JIT""Nicolas Geoffray2015-02-241-29/+17
|\
| * Revert "Add JIT"Nicolas Geoffray2015-02-241-29/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sorry, run-test crashes on target: 0-05 12:15:51.633 I/DEBUG (27995): Abort message: 'art/runtime/mirror/art_method.cc:349] Check failed: PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc) java.lang.Throwable java.lang.Throwable.fillInStackTrace() pc=71e3366b code=0x71e3362d size=ad000000' 10-05 12:15:51.633 I/DEBUG (27995): r0 00000000 r1 0000542b r2 00000006 r3 00000000 10-05 12:15:51.633 I/DEBUG (27995): r4 00000006 r5 b6f9addc r6 00000002 r7 0000010c 10-05 12:15:51.633 I/DEBUG (27995): r8 b63fe1e8 r9 be8e1418 sl b6427400 fp b63fcce0 10-05 12:15:51.633 I/DEBUG (27995): ip 0000542b sp be8e1358 lr b6e9a27b pc b6e9c280 cpsr 40070010 10-05 12:15:51.633 I/DEBUG (27995): Bug: 17950037 This reverts commit 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4. Change-Id: I6f88849bc6f2befed0c0aaa0b7b2a08c967a83c3
* | Merge "Add JIT"Mathieu Chartier2015-02-241-17/+29
|\|
| * Add JITMathieu Chartier2015-02-231-17/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently disabled by default unless -Xjit is passed in. The proposed JIT is a method JIT which works by utilizing interpreter instrumentation to request compilation of hot methods async during runtime. JIT options: -Xjit / -Xnojit -Xjitcodecachesize:N -Xjitthreshold:integervalue The JIT has a shared copy of a compiler driver which is accessed by worker threads to compile individual methods. Added JIT code cache and data cache, currently sized at 2 MB capacity by default. Most apps will only fill a small fraction of this cache however. Added support to the compiler for compiling interpreter quickened byte codes. Added test target ART_TEST_JIT=TRUE and --jit for run-test. TODO: Clean up code cache. Delete compiled methods after they are added to code cache. Add more optimizations related to runtime checks e.g. direct pointers for invokes. Add method recompilation. Move instrumentation to DexFile to improve performance and reduce memory usage. Bug: 17950037 Change-Id: Ifa5b2684a2d5059ec5a5210733900aafa3c51bca
* | ART: Allow the execution to stop if the compilation fails via an optionJean Christophe Beyler2015-02-231-0/+4
|/ | | | | | | | | | | | | | | | | | | | | The current implementation continues the execution of the application if dex2oat fails by relying on the interpreter. This patch adds a -Xno-dex-file-fallback option to stop the default behavior. This can be used two-fold. First, one can enforce that a runtime only starts with a boot image. A follow-up patch will ensure that dex2oat (for apps) and patchoat in general request that mode and close gracefully otherwise. Second, this can be used for testing and debugging purposes, as it ensures that compiler failures & aborts are not silently ignored. Add testing. Bug: 19100590 Change-Id: Iaf07b5ccf00942ca8a8ec8687599320a3ddbc089 Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
* Implement a simple count based boot marker.Narayan Kamath2015-02-211-0/+3
| | | | | | | | | | | | | We write the number of failed boots to the marker and only prune the dalvik cache if the number of consecutive failed boots is higher than a predefined threshold. Note that the code is forgiving of errors related to boot markers; we continue the boot process even if we're unable to create / write or flush the boot marker. bug: 19360096 Change-Id: Ia17c3b783318ddf43c9199d0f7f09c54a4176667
* Make UseTLAB a bool flag.Hiroshi Yamauchi2015-02-201-0/+1
| | | | | | This would make it easier to override its default value at build time. Change-Id: I643fe1afaf492f0443dc01df0c9a62bb3fa025d9
* Fix gcstress tests.Hiroshi Yamauchi2015-02-061-7/+0
| | | | | Bug: 19295410 Change-Id: I15db7c1f9c78b632106beab6a6c97a2b3c37f110
* 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