summaryrefslogtreecommitdiffstats
path: root/compiler/driver/compiler_driver.cc
Commit message (Collapse)AuthorAgeFilesLines
* Change MethodHelper to use a Handle.Mathieu Chartier2014-06-091-14/+13
| | | | | | | | | | | Added ConstHandle to help prevent errors where you modify the value stored in the handle of the caller. Also fixed compaction bugs related to not knowing MethodHelper::GetReturnType can resolve types. This bug was present in interpreter RETURN_OBJECT. Bug: 13077697 Change-Id: I71f964d4d810ab4debda1a09bc968af8f3c874a3
* Fixed and refactored profiler options handlingCalin Juravle2014-06-061-13/+16
| | | | | | | | | | | | | - 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
* Clean up the sampling profilerCalin Juravle2014-06-061-24/+13
| | | | | | | | | | | | - rename variables/fields names to match the code style (use _underscore_names_) - extract common property parsing in utils.cc - fail to load profile file if any line is malformed - added ProfileFile to manage the profile data generate in the previous runs (replaces ProfileHelper and nests ProfileData) Bug: 12877748 Change-Id: Ie7bda30bfdeb7e78534c986615b0649eac12a97b
* ART: Fix sharpening across dex filesAndreas Gampe2014-05-271-1/+1
| | | | | Bug: 15196336 Change-Id: If4301bcddce0ddbc60bb33403e4a76eed35bcb2f
* Revert "Revert "Fix an outstanding compaction bug in interpreter.""Mathieu Chartier2014-05-231-6/+8
| | | | | | | | | | Fixed the generic trampoline to not use ToJObject when unnecessary. Bug: 15167269 This reverts commit 3bdb873122964da7937eb070cbcf2ef638a8e459. Change-Id: I0525d0e0f3afb753c770e1572070a0fa22b02271
* Revert "Fix an outstanding compaction bug in interpreter."Mathieu Chartier2014-05-221-8/+6
| | | | | | This reverts commit e09ae0920be57760fb390b6944bce420fa0b5582. Change-Id: I48036306130d5ccfec683d0dc3e9a642a02ee9c1
* Fix an outstanding compaction bug in interpreter.Mathieu Chartier2014-05-221-6/+8
| | | | | | | | | | | | | | | | Fixed a bug in DoFieldPut where the FieldHelper GetType could cause thread suspension which would result in a stale obj. Added more handles in the class linker to facilitate moving fiels and methods in the future. Removed un-necessarly passing handle references since these are value types and don't need to be passed by reference. Added a special NullHandle type which allows null handles without a handle scope. Change-Id: I1b51723920a2e4f4f8b2907066f578a3e879fd5b
* Merge "Method inlining across dex files in boot image."Vladimir Marko2014-05-221-20/+14
|\
| * Method inlining across dex files in boot image.Vladimir Marko2014-05-221-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix LoadCodeAddress() and LoadMethodAddress() to use the dex file in addition to the method index to uniquely identify the literal. With that fix in place, when we have both the direct code and the direct method, we can safely pass the actual target method id instead of the method id from the same dex file in the method lowering info. This was already done for calls from apps into boot image (and thus there was a bug with a tiny risk of the wrong literal being used) and now we also do that for calls within the boot image. The latter allows the inlining pass to inline many more methods than before in the boot image. Bug: 15021903 Change-Id: Ic765ce9809b43ef07e7db32b8e3fbc9acb09147f
* | Begin migration of art::Atomic to std::atomic.Ian Rogers2014-05-201-2/+2
|/ | | | Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
* Now we have a proper C++ library, use std::unique_ptr.Ian Rogers2014-05-191-6/+6
| | | | | | | Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
* Delete ClassHelper and fix compaction bug in GetDirectInterfaceMathieu Chartier2014-05-181-11/+18
| | | | | | | | | | | Cleanup helps to prevent compaction bugs. Fixed a fairly serious compaction error caused by calling ClassHelper::GetDirectInterface without handling the case where it causes thread suspension due to ResolveType. Bug: 8981901 Change-Id: I82b3bb6dd48d21eb6ece7aae0733c4a23c2bc408
* Change ObjectLock to take Handle instead of Handle pointer.Mathieu Chartier2014-05-161-1/+1
| | | | Change-Id: I9abdcdc5c9c9174634336b9250ab24c6aee434ec
* Merge "Changes for vogar compatibility"Kenny Root2014-05-131-3/+7
|\
| * Changes for vogar compatibilityKenny Root2014-05-131-3/+7
| | | | | | | | | | | | | | | | | | | | | | Make sure dex2oat can make an image with an empty list of image_classes. Add in some checks to make sure that no bad arguments sneak into CompilerDriver. If we're not on the ART_TARGET, we should check for the "hostdex" versions of the libraries to substitute in our libart version. Change-Id: I5e8485c6089d25664492f0217b43ef64ca84c061
* | Add Handle/HandleScope and delete SirtRef.Mathieu Chartier2014-05-131-69/+84
|/ | | | | | | | | | | | | | | | Delete SirtRef and replaced it with Handle. Handles are value types which wrap around StackReference*. Renamed StackIndirectReferenceTable to HandleScope. Added a scoped handle wrapper which wraps around an Object** and restores it in its destructor. Renamed Handle::get -> Get. Bug: 8473721 Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
* Give Compiler a back reference to the driver.Ian Rogers2014-05-061-8/+7
| | | | | | | | | | The compiler driver is a single object delegating work to the compiler, rather than passing it through to every Compiler call make it a member of Compiler so that it maybe queried. This simplifies the Compiler API and makes the relationship to CompilerDriver more explicit. Remove reference arguments that contravene code style. Change-Id: Iba47f2e3cbda679a7ec7588f26188d77643aa2c6
* Create stack traces in unstarted runtimes.Ian Rogers2014-05-031-37/+27
| | | | | | | | Use to diagnose failed initialization in dex2oat of boot (-verbose:compiler). Fix identity hashCode, ArtMethod.getMethodName, IntegralToString.convertInt and use of Void when called from a unstarted runtime. Change-Id: I2d536174b59e2e5f19519f93fc6b5916652fb6cd
* Add finalizer references from the entrypoints.Mathieu Chartier2014-05-011-1/+2
| | | | | | | | | | | | | | | | | | We now have an invariant where we never allocate finalizable objects with the Initialized or Resolved entrypoints. This speeds up allocation by only doing the check in the slow path. Before: MemAllocTest: 3625, 3707, 3641 EvaluateAndApplyChanges: 3448, 3421, 3413 After: MemAllocTest: 3164, 3109, 3135 EvaluateAndApplyChanges: 3272, 3299, 3353 Bug: 14078487 Change-Id: I2b0534af3e7c75ea5e5257cf3647744f7abfb74e
* Centralize instruction-set pointer-size, alignment, 64b-width codeAndreas Gampe2014-04-141-2/+1
| | | | | | | | | in instruction_set.h/cc This allows to clean up some places that currently make explicit comparisons. Change-Id: I0dcc924c52fa53306f706aceea93a2d4a655c5df
* Fix problem with empty profiles.Dave Allison2014-04-101-1/+1
| | | | | | | | | | This fixes an issue where a profile file was created by the installer but never written by the runtime. This happens when profiles are off. This caused the compiler to think that there are no methods worthy of compilation and skipped everything. Bug: 13960166 Change-Id: I4c4598d4746218e21ca949112071dc1424d7d1f9
* Revert "Revert "Revert "Use trampolines for calls to helpers"""Dave Allison2014-04-091-41/+0
| | | | | | This reverts commit f9487c039efb4112616d438593a2ab02792e0304. Change-Id: Id48a4aae4ecce73db468587967968a3f7618b700
* Revert "Revert "Use trampolines for calls to helpers""Dave Allison2014-04-091-0/+41
| | | | | | | | | This reverts commit 081f73e888b3c246cf7635db37b7f1105cf1a2ff. Change-Id: Ibd777f8ce73cf8ed6c4cb81d50bf6437ac28cb61 Conflicts: compiler/dex/quick/mir_to_lir.h
* Merge "Tweaked profile significant_difference."Calin Juravle2014-04-081-80/+1
|\
| * Tweaked profile significant_difference.Calin Juravle2014-04-071-80/+1
| | | | | | | | | | | | | | | | | | | | - renamed to 'change_thr' - now it represents how much the top K leading samples need to change (in percents) in order to trigger compilation. - extracted ProfileData & file parsing in profiler.h Bug: 12877748 Change-Id: I10f66120dd5e68b8a690bfa0e9914c07f63c50d5
* | Revert "Use trampolines for calls to helpers"Dave Allison2014-04-071-39/+0
| | | | | | | | | | | | This reverts commit 754ddad084ccb610d0cf486f6131bdc69bae5bc6. Change-Id: Icd979adee1d8d781b40a5e75daf3719444cb72e8
* | Use trampolines for calls to helpersDave Allison2014-04-041-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an ARM specific optimization to the compiler that uses trampoline islands to make calls to runtime helper functions. The intention is to reduce the size of the generated code (by 2 bytes per call) without affecting performance. By default this is on when generating an OAT file. It is off when compiling to memory. To switch this off in dex2oat, use the command line option: --no-helper-trampolines Enhances disassembler to print the trampoline entry on the BL instruction like this: 0xb6a850c0: f7ffff9e bl -196 (0xb6a85000) ; pTestSuspend Bug: 12607709 Change-Id: I9202bdb7cf21252ad807bd48701f1f6ce8e3d0fe
* | Re-enable DEX-to-DEX compilation pathSebastien Hertz2014-04-041-2/+3
| | | | | | | | | | Bug: 13807032 Change-Id: I6de7adb81a0f955a93257b83db9ad689ebcd90ad
* | Merge "art: Handle x86_64 architecture equal to x86"Bill Buzbee2014-04-031-0/+5
|\ \ | |/ |/|
| * art: Handle x86_64 architecture equal to x86Dmitry Petrochenko2014-04-031-0/+5
| | | | | | | | | | | | | | | | This patch forces FE/ME to treat x86_64 as x86 exactly. The x86_64 logic will be revised later when assembly will be ready. Change-Id: I4a92477a6eeaa9a11fd710d35c602d8d6f88cbb6 Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
* | Merge "Profile: renamed kThresholdPercent and make it configurable"Calin Juravle2014-04-031-11/+25
|\ \
| * | Profile: renamed kThresholdPercent and make it configurableCalin Juravle2014-04-021-11/+25
| | | | | | | | | | | | | | | Bug: 12877748 Change-Id: If266f20f77faad4a726ef8df451a0c42f541392f
* | | Merge "Profile: repurposed kTresholdPercent"Calin Juravle2014-04-031-11/+35
|\ \ \ | |/ / | | / | |/ |/|
| * Profile: repurposed kTresholdPercentCalin Juravle2014-04-021-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously kTresholdPercent was the percentage of samples of the total that a method must comprise before compiling. I changed it to mean the threshold for a running total...i.e. compile all the methods that comprise K% of the samples cumulatively. (in the process fixed ProfileData#percent doc and changed its name) Bug: 12877748 Change-Id: Ib0e18e525a16c11b189afc3d840c09183ac629de
* | Add support for -Xverify:none mode.Jeff Hao2014-04-021-1/+6
| | | | | | | | | | | | | | This mode skips all verification and compilation. Public bug: https://code.google.com/p/android/issues/detail?id=67664 Change-Id: Idd00ab8e9e46d129c02988b063c41a507e07bf5b
* | Merge "Fixed total method count in profile file parsing."Calin Juravle2014-04-021-1/+1
|\ \ | |/
| * Fixed total method count in profile file parsing.Calin Juravle2014-04-021-1/+1
| | | | | | | | Change-Id: Iae38b3ca296378d17f054ac330301035ec684084
* | Allow mixing of thread offsets between 32 and 64bit architectures.Ian Rogers2014-04-011-19/+21
|/ | | | | | | Begin a more full implementation x86-64 REX prefixes. Doesn't implement 64bit thread offset support for the JNI compiler. Change-Id: If9af2f08a1833c21ddb4b4077f9b03add1a05147
* AArch64: Add arm64 runtime support.Stuart Monteith2014-03-191-1/+1
| | | | | | | | | Adds support for arm64 to ART. Assembler stubs are sufficient for down calls into interpreter. JNI compiler and generics are not finished. Basic Generic JNI functionality. Change-Id: I4a07c79d1e037b9f5746673480e32cf456867b82
* Fix comment typo.Ian Rogers2014-03-171-1/+1
| | | | Change-Id: Ib03f4e5dbdf380f9c94f7a18c1ea755b03c1fe3e
* Use quick generic JNI calls based on compiler driver options.Ian Rogers2014-03-141-6/+8
| | | | Change-Id: Ic70f4b9b5759eb11b35677c0039fb00eb1c4c506
* Merge "Allow patching between dex files in the boot classpath."Jeff Hao2014-03-131-2/+10
|\
| * Allow patching between dex files in the boot classpath.Jeff Hao2014-03-121-2/+10
| | | | | | | | Change-Id: I53f219a5382d0fcd580e96e50025fdad4fc399df
* | Merge "Move inline method detection to runtime."Vladimir Marko2014-03-131-23/+0
|\ \
| * | Move inline method detection to runtime.Vladimir Marko2014-03-121-23/+0
| |/ | | | | | | | | | | The debugger needs this for selective deoptimization. Change-Id: I8100000449b56e619288fb05d41ea6f02b53b334
* | Add command line support for enabling the optimizing compiler.Nicolas Geoffray2014-03-131-13/+13
|/ | | | | | | Also run tests with the optimizing compiler enabled when the file art/USE_OPTIMIZING_COMPILER is present. Change-Id: Ibc33eed62a43547bc3b9fe786d014c0d81b5add8
* Cache method lowering info in mir graph.Vladimir Marko2014-03-101-129/+80
| | | | | | | | | This should enable easy inlining checks. It should also improve compilation time of methods that call the same methods over and over - it is exactly such methods that tend to exceed our 100ms time limit. Change-Id: If01cd18e039071a74a1444570283c153429c9cd4
* Make use of profiling information for dex2oatDave Allison2014-03-071-3/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the profile file exists, the compiler driver will read it and store the data in an internal map. Then, when we want to work out whether to compile a method or not, the map is consulted and if the method shows up with a high enough percentage of use we compile it. The profile file itself is created by installd and is writeable by the app. The file is in /data/dalvik-cache/profiles and is named by the package name. This also modifies the profiler itself to: 1. Only count runnable threads (not suspended threads) in the profile 2. Use system properties to allow tuning of the profile parameters 3. Merge profiles from multiple processes using file locking. Bug: 12877748 Change-Id: Iab2f3a327a2860db2a80d5724277d6c626227f2b Conflicts: compiler/dex/frontend.cc compiler/dex/mir_analysis.cc compiler/dex/verification_results.cc compiler/driver/compiler_driver.cc dex2oat/dex2oat.cc runtime/class_linker.cc runtime/runtime.cc runtime/runtime.h
* Add more VerifyObject calls.Mathieu Chartier2014-03-071-0/+1
| | | | | | | | | | | Added verify object calls to SirtRef, IndirectReferenceTable, ReferenceTable. Removed un-needed verify object in ScopedObjectAccess / DecodeJObject since object sources are handled. Bug: 12934910 Change-Id: I55a46a8ea61fed2a77526eda27fd2cce97a9b125
* Initial changes towards Generic JNI optionAndreas Gampe2014-03-031-0/+9
| | | | | | | | Some initial changes that lead to an UNIMPLEMENTED. Works by not compiling for JNI right now and tracking native methods which have neither quick nor portable code. Uses new trampoline. Change-Id: I5448654044eb2717752fd7359f4ef8bd5c17be6e