Age | Commit message (Collapse) | Author |
|
The runtime, compiler, dex2oat, and oatdump now are in seperate trees
to prevent dependency creep. They can now be individually built
without rebuilding the rest of the art projects. dalvikvm and jdwpspy
were already this way. Builds in the art directory should behave as
before, building everything including tests.
Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81
|
|
- Move compile-time code to src/compiler and libart-compiler
OatWriter, ImageWriter, ElfWriter, ElfFixup, ElfStripper, stub generation
- Move ClassReference and MethodReference to remove MethodVerifier dependency on CompilerDriver
- Move runtime_support_llvm.cc out of src/compiler and next to runtime_support.cc
- Change dex2oat and gtests to directly depend on libart-compiler
- Move non-common definitions from Android.common.mk to more specific makefiles
- Add LOCAL_ADDITIONAL_DEPENDENCIES on appropriate makefiles
Change-Id: I897027e69945914128f21f317a92caf9255bc600
|
|
Change-Id: Id8c69cc349290ba7d255ea214f8d1b51d3ce062a
|
|
Change-Id: Id13a58fc6da8a2c39f47bcee14a743c88fc899b7
|
|
- Modified makefile to take the existance of SEA_IR_ART
file to mean "switch to sea ir mode".
- Switching SEA IR mode on leads to the new compiler being
fed the fibonacci methods only, if they are used as input.
- Added partial support for the control flow subgraph of
the SEA IR (instruction nodes and region nodes for
conditional and unconditional branches).
Change-Id: I29020b8e2df5a00fde75715c3683cc25038589f4
Conflicts:
src/compiler/driver/compiler_driver.cc
|
|
This CL adds quickening support for methods which are interpreted at runtime.
This CL introduces a DEX-to-DEX compiler. A method is now compiled in one of
the two following modes:
- Native compilation: the method is compiled by the Quick or Portable backends.
At runtime, the generated native target-dependent code is executed.
- DEX-to-DEX compilation: the method is executed by the interpreter at runtime.
Its DEX code is compiled so some instructions can be replaced by special
instructions only valid at runtime. No native code is generated.
The quickening adds special instructions to improve runtime performance. They
are "-quick" versions of the following instructions:
- iget/iput
- iget-wide/iput-wide
- iget-object/iput-object
- invoke-virtual/range.
These special instructions cannot be treated by the verifier since they lose
the field/method index referencing the field/method being accessed/invoked.
To prevent this, the DEX-to-DEX compiler is run only on methods of preverified
classes (without verification error at compilation time).
The DEX-to-DEX compiler implements quickening support using the CompilerDriver
interface like the native compiler does (Quick or Portable backends).
To replace instructions, the DEX-to-DEX compiler must be able to modify the
mmapped DEX file. Since it can be read-only protected, the DEX-to-DEX compiler
must be able to temporarily change its protection to read-write mmapped file.
To achieve this, this CL adds support for changing DEX file protection with
DexFile::EnableWrite and DexFile::DisableWrite methods. Besides, it also adds
a dedicated lock (DexFile::modification_lock) to ensure thread-safety and avoid
concurrent DEX file protection change (from a parallel DEX-to-DEX compiler on
the same DEX file).
Change-Id: Iaafd103b9766810d7fc94a2c424a8fafba66e26a
|
|
Greater use of directories and namespaces.
Fix bugs that cause verify options to fail.
Address numerous other issues:
GC barrier wait occurring holding locks:
GC barrier waits occur when we wait for threads to run the check point function
on themselves. This is happening with the heap bitmap and mutator lock held
meaning that a thread that tries to take either lock exclusively will block
waiting on a thread that is waiting. If this thread is the thread we're waiting
to run the check point then the VM will deadlock.
This deadlock occurred unnoticed as the call to check for wait safety was
removed in: https://googleplex-android-review.googlesource.com/#/c/249423/1.
NewTimingLogger:
Existing timing log states when a split ends but not when it begins. This isn't
good for systrace, in the context of GC it means that races between mutators
and the GC are hard to discover what phase the GC is in, we know what phase it
just finished and derive but that's not ideal.
Support for only 1 discontinuous space:
Code special cases continuous and large object space, rather than assuming we
can have a collection of both.
Sorted atomic stacks:
Used to improve verification performance. Simplify their use and add extra
checks.
Simplify mod-union table abstractions.
Reduce use of std::strings and their associated overhead in hot code.
Make time units of fields explicit.
Reduce confusion that IsAllocSpace is really IsDlMallocSpace.
Make GetTotalMemory (exposed via System) equal to the footprint (as in Dalvik)
rather than the max memory footprint.
Change-Id: Ie87067140fa4499b15edab691fe6565d79599812
|
|
Recent changes to IsAbstract for arrays pushed us in to always generating
slow-paths.
Change-Id: I52fb50953949f337243961a308eabf0d684eacf3
|
|
Change-Id: Ia51cdc199cdeaf409755ab8da23323e204ce041e
|
|
|
|
Only use ScopedObjectAccess to check correct dex cache semantics.
Change-Id: Ia4d3475368f92736c8a705b1b9a13175fc0af413
|
|
Saves class linker from having to set code pointers when loading
from an image. Added stubs for quick and portable resolution
trampolines, and interpreter-to-interpreter and interpreter-to-quick
entry points. Also added sizing stats output for oat writer.
Change-Id: I3905fae81047742c23d1cf0ca001db798db971b1
|
|
If a class is final and not and array we can generate a 1/0 based on class
equality.
Use a method's declaring class if it matches the instance-of class (common in
Java equals methods).
Don't do a class pointer comparison in the case of an abstract or interface
class, just go straight into the slow-path.
Fix performance bug where peep-hole verifier pass didn't merge into the
fall-through line if the next instruction wasn't interesting.
Change-Id: Idb47ec6acebfd25a344ed74adaacba02fafc7df2
|
|
Bug: 9284898.
Also statistic to show check-cast ellision use.
Fix bug where the check-cast ellision was using wrong dex pc.
Avoid a use of DecodedInstruction.
Other formatting clean-up.
Change-Id: Ibf67941a24148b615896d0be6f2f29ce5034e53a
|
|
When a reference is imprecise we may still be able to devirtualize if the
method that is dispatched upon may not be overridden (ie final).
Some other tidying of the devirtualization code.
For boot this increases the frequency of type based devirtualization by a
little more than 0.01%.
Change-Id: I050efbcc78c6b89135a6432bd7c2e946d8efbab4
|
|
Make type hierarchy for unresolved and unitialized types explicit.
Tidy and comment code.
Add DexFile::FindStringId that takes UTF-16 to avoid unnecessary UTF-8
conversions during image writing.
Explicitly disable RTTI that causes problems in debug builds.
Change-Id: I701f1c3be8be5854fcabf5ec39e9f9c5d388aab0
|
|
Make more code inlinable by moving to header files.
Use reserve on std::vectors to avoid reallocation.
Change-Id: I1bf67d32dd58ff5c06dec73a247fadc3de593e91
|
|
Fix bad usage of std::string in: the verifier and compiler driver method
arguments, causing unnecessary boxing and allocations; in creating a symbol for
the dex compilation unit, that is only used in portable builds; in pattern
matching for intrinsics by name.
Make class linker dex and classes locks reader/writer to allow concurrent
dex cache or class querying. Refactor ComputeCompilingMethodsClass to pass in a
dex cache hint, to avoid taking any locks when the dex file of the compiling
method matches that of the field or method being resolved.
Make the RegType's HasClass method virtual to avoid frequent virtual method
dispatch. Make RegTypeCache GetFromId inlinable.
Various other bits of whitespace and formatting clean-up.
Change-Id: Id152e1e5a6fed2961dad0b612b7aa0c48001ef94
|
|
MIPS build exposed a latest bug in DexFile's binary search code.
Portable build always requires a dex cache when using verifier based
sharpening.
Change-Id: I235c033d7eba0272b264f5dbda209ff5cd7cce93
|
|
If we know the type of a receiver in the verifier we record devirtualization
data. Currently we only use this data to avoid virtual method dispatch when
we know the receiver of a method isn't a sub-class. This change allows
devirtualization of virtual and interface methods when we know the receiver's
type and the method the we'd find via dispatch is either known within boot or
has a reference from the current dex file.
Pass the receiver through to the method resolution trampoline as
devirtualization may mean the dex method index needs to be made more accurate
for the receiver.
Tidy up method devirtualization and related statistics.
Push the devirtualization map lookup into a less common case to avoid
taking its lock.
Make MethodReference a struct rather than a typedef of a pair, so the members
can have more meaningful names than first and second.
Rough statistics show that we devirtualize using this change around 2.5% of
the time, whilst some apps like GMS core devirtualize over 3.4% of the time.
Change-Id: Ieed3471dbedfc4cc881d652631b67176bb37d394
|
|
Change-Id: I9b02d2df95bbeafa6e6387b461f574c57337a61e
|
|
The interpreter constructs a shadow frame instead of arg array to make
interpreter to interpreter transitions faster. This adds a pointer to
an entry for the interpreter to each method.
Change-Id: If48911d3aa3470847b8548a9e92090b829f4f254
|
|
We were seeing things compile when they shouldn't have. This fixes it. Plus added
a bit more documentation to options, set default values for the two small art related
thresholds to zero.
Change-Id: Id5db11962f3e30d8d4ee6b85d4cf7d6e66323adb
|
|
Change-Id: I2c7baf8e3ccb7a0f05f767628917caed83720a2a
|
|
Sharpening invoke-virtual and invoke-interface calls to invoke-direct for cases
where the type of "this" pointer in the invoke- params is precisely known.
Instructions that have an invoke opcode are marked as interesting, for each invoke-virtual/interface
we come across with a precise type for "this" we mark the location as a candidate for sharpening,
resolve the concrete method and save its method reference <DexFile, DexMethodIndex> to be sharpened
in CompilerDriver::ComputeInvokeInfo().
Added a new entry to AOT statistics showing the percentage of sharpened calls that were based on
type analysis.
Fix a minor bug in type creation for GetSuperClass(). Previously super class of a precise reference
had precise types created which is not necessarily the case.
Fixed DCHECK in Class::FindVirtualMethodForVirtual to handle cases for Miranda methods.
Sharpening only takes place for cases where no soft failures happen at verification time.
Change-Id: Ic027d0226d6f95260c1918014cb6313f2e0ca455
|
|
|
|
Adds a filter per method and program size (in method count). Right now, options are treated
as runtime options...but we might want to change this and separate options for compilers and
runtime.
Change-Id: I8c3e925116119af8ffa95ff09f77bcfdd173767b
|
|
Change-Id: I1e038e63ccad098a5812bbb1532ca4dd839d4be0
|
|
This reverts commit 31d4b8e0058b33e2c5ce792a69e5e897583652e2.
|
|
Sharpening invoke-virtual and invoke-interface calls to invoke-direct for cases
where the type of "this" pointer in the invoke- params is precisely known.
Instructions that have an invoke opcode are marked as interesting, for each invoke-virtual/interface
we come across with a precise type for "this" we mark the location as a candidate for sharpening,
resolve the concrete method and save its method reference <DexFile, DexMethodIndex> to be sharpened
in CompilerDriver::ComputeInvokeInfo().
Added a new entry to AOT statistics showing the percentage of sharpened calls that were based on
type analysis.
Fix a minor bug in type creation for GetSuperClass(). Previously super class of a precise reference
had precise types created which is not necessarily the case.
Fixed DCHECK in Class::FindVirtualMethodForVirtual to handle cases for Miranda methods.
Change-Id: I0626d5cd1bc70a685db71abec067370ebdaf6edc
|
|
|
|
This reverts commit b0682d5f7970470130f43d35f37ae7605a8a9bb8
Change-Id: I2b0dc3e716ee5c23b89d9fa6eb0ef05c24784b3e
|
|
|
|
Abstract method error stub and jni dlsym lookup stubs are gone.
After this change, the image no longer needs to be executable.
Change-Id: Ic75d72bf7e76e3b8ecc596e82af68ab592dde15e
|
|
Sharpening invoke-virtual and invoke-interface calls to invoke-direct for cases
where the type of "this" pointer in the invoke- params is precisely known.
Instructions that have an invoke opcode are marked as interesting, for each invoke-virtual/interface
we come across with a precise type for "this" we mark the location as a candidate for sharpening,
resolve the concrete method and save its method reference <DexFile, DexMethodIndex> to be sharpened
in CompilerDriver::ComputeInvokeInfo().
Added a new entry to AOT statistics showing the percentage of sharpened calls that were based on
type analysis.
Fix a minor bug in type creation for GetSuperClass(). Previously super class of a precise reference
had precise types created which is not necessarily the case.
Change-Id: Iee61858e84242dfc82be363ee221d2747a1ac86a
|
|
Created assembly versions of resolution trampoline for portable and
quick. Removed compiled version from the image.
Change-Id: I183e110c4e102fb45ce6e7f4e855f8bed7986251
|
|
Change-Id: I92dda15aaa2626821befcb9a5db3801b0ab074e5
|
|
When false, soft failures in the verifier become hard failures. It should
only be false when not compiling, and calling the verifier from the class
linker.
Change-Id: I664e5cbe491784b280aa5bfdb7e7fc0b771814f5
|
|
Don't compile class initializers, compile programs with fewer than
commmand-line specified number of methods, mildly refactor SLOW_MODE,
rename into LIGHT_MODE.
Also, walks the image for uncompiled methods and fixes up with pointers to the
interpreter entry point.
(Removed hot method list and light method limit as these are experimental.)
Change-Id: I2ae33d8add84ab9f4d76f9d910cae422c81a7832
|
|
Change-Id: I3a0961be43dc366552b8f1f2219b16cf7d20fac9
|
|
Change https://googleplex-android-review.googlesource.com/#/c/249463/ set a
boolean prior to testing it meaning that all aborts were seen as recursive and
no meaningful log information was given.
Also a fix related to https://googleplex-android-review.googlesource.com/293665
where we were attempting to dump other threads stacks during aborting even
though those threads weren't suspended.
Change-Id: I1f848512c5e380529579db3d16bb8f5ddda36ad3
|
|
Change-Id: If187062cc456db49a6eb4987c0548f09fac75cf4
|
|
Make the instrumentation responsible for whether we want method entry/exit
stubs, and allow it to use interpreter entry stubs when instruction by
instruction instrumentation is required. Improve deoptimization so more JDWP
test cases are passing.
Refactor exception debug posting, in particular improve reporting in the
interpreter. Improve class linker exception throwing so that broken dex files
are more likely to be reported. Fixes the performance issue Bug: 8410519.
Fix some error reporting lock level errors for the large object space. Make
fast object verification faster.
Add some debug mode robustness to finding dex PCs in GC maps.
Add printf attributes to JniAbortF and fix errors.
Expand run-test 044 to test return behaviors and fix issues with not throwing
appropriate exceptions for proxies.
Ensure causes are reported with a class linker NoClassDefFoundError and JNI
NoSuchFieldError.
Remove unused debugMe and updateDebuggerFromCode.
There's a minor sizing tweak to the arg array builder, and an extra reference
array check in the interpreter.
Some clean-up of trace code.
Fix reg type cache destructor if it is called after the reg type cache is
shutdown (as is the case in oatdump).
Change-Id: I6519c7b35df77f978d011999354c864f4918e8ce
|
|
Change-Id: Ib0b2829fed9d7efee09d098ce4db9d13f2fa2eac
|
|
https://googleplex-android.googlesource.com/a/platform/art into fixes-for-art-build-with-mr2
Change-Id: Ie46d1f77f98b8a6f55f02b8614cb88b36b6a2d44
|
|
|
|
Note that the oat file version is now bumped to 004. A clean-oat will be
necessary after syncing this change.
Change-Id: If8875335b7fcc39b6b40c6f95de07da50da7b6b8
|
|
gtest output
Change-Id: I93b4a83861803a5e610c719bf3468f8967701ff0
|
|
Change-Id: I7b5c604601958c80050d19fd337cfca494d94554
|
|
Run ART with the interpreter for all but boot.oat code.
Change-Id: I1654ecff6769a6c754f713be7580717d5ce07dc1
|