summaryrefslogtreecommitdiffstats
path: root/compiler/driver/compiler_driver.h
Commit message (Collapse)AuthorAgeFilesLines
* Fixed and refactored profiler options handlingCalin Juravle2014-06-061-2/+2
| | | | | | | | | | | | | - 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-1/+1
| | | | | | | | | | | | - 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
* Revert "Revert "Fix an outstanding compaction bug in interpreter.""Mathieu Chartier2014-05-231-8/+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/+8
| | | | | | This reverts commit e09ae0920be57760fb390b6944bce420fa0b5582. Change-Id: I48036306130d5ccfec683d0dc3e9a642a02ee9c1
* Fix an outstanding compaction bug in interpreter.Mathieu Chartier2014-05-221-8/+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
* Now we have a proper C++ library, use std::unique_ptr.Ian Rogers2014-05-191-4/+4
| | | | | | | Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
* Add Handle/HandleScope and delete SirtRef.Mathieu Chartier2014-05-131-9/+9
| | | | | | | | | | | | | | | | 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
* Add finalizer references from the entrypoints.Mathieu Chartier2014-05-011-1/+1
| | | | | | | | | | | | | | | | | | 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-1/+0
| | | | | | | | | in instruction_set.h/cc This allows to clean up some places that currently make explicit comparisons. Change-Id: I0dcc924c52fa53306f706aceea93a2d4a655c5df
* Revert "Revert "Revert "Use trampolines for calls to helpers"""Dave Allison2014-04-091-117/+0
| | | | | | This reverts commit f9487c039efb4112616d438593a2ab02792e0304. Change-Id: Id48a4aae4ecce73db468587967968a3f7618b700
* Revert "Revert "Use trampolines for calls to helpers""Dave Allison2014-04-091-0/+117
| | | | | | | | | This reverts commit 081f73e888b3c246cf7635db37b7f1105cf1a2ff. Change-Id: Ibd777f8ce73cf8ed6c4cb81d50bf6437ac28cb61 Conflicts: compiler/dex/quick/mir_to_lir.h
* Tweaked profile significant_difference.Calin Juravle2014-04-071-34/+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
* Merge "Profile: repurposed kTresholdPercent"Calin Juravle2014-04-031-9/+15
|\
| * Profile: repurposed kTresholdPercentCalin Juravle2014-04-021-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Allow mixing of thread offsets between 32 and 64bit architectures.Ian Rogers2014-04-011-0/+1
|/ | | | | | | Begin a more full implementation x86-64 REX prefixes. Doesn't implement 64bit thread offset support for the JNI compiler. Change-Id: If9af2f08a1833c21ddb4b4077f9b03add1a05147
* Early inlining of simple methods.Vladimir Marko2014-03-181-0/+4
| | | | | | | | Inlining "special" methods: empty methods, methods returning constants or their arguments, simple getters and setters. Bug: 8164439 Change-Id: I8c7fa9c14351fbb2470000b378a22974daaef236
* Merge "Allow patching between dex files in the boot classpath."Jeff Hao2014-03-131-2/+12
|\
| * Allow patching between dex files in the boot classpath.Jeff Hao2014-03-121-2/+12
| | | | | | | | Change-Id: I53f219a5382d0fcd580e96e50025fdad4fc399df
* | Merge "Move inline method detection to runtime."Vladimir Marko2014-03-131-7/+0
|\ \
| * | Move inline method detection to runtime.Vladimir Marko2014-03-121-7/+0
| |/ | | | | | | | | | | The debugger needs this for selective deoptimization. Change-Id: I8100000449b56e619288fb05d41ea6f02b53b334
* | Add command line support for enabling the optimizing compiler.Nicolas Geoffray2014-03-131-5/+5
|/ | | | | | | 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-3/+53
| | | | | | | | | 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
* Revert "Revert "Make clang the default compiler on host.""Ian Rogers2014-03-081-1/+4
| | | | | | This reverts commit d54f3a6219bca6ae018f4395fa0f1254bd4459be. Change-Id: Id96bb52a0d599f8848010d1589bdf0f70fc7124b
* Revert "Make clang the default compiler on host."Ian Rogers2014-03-081-4/+1
| | | | | | This reverts commit 87f8b4cf0c1d6aab3eb5d1e99cc4e7cf175ef772. Change-Id: I91a513042f0f9cf66288a296ad4a3b5da7830c7b
* Make clang the default compiler on host.Ian Rogers2014-03-071-1/+4
| | | | | | | | | | | | | Motivation, GCC's compiler warnings are inferior to clang's. -Wthread-safety is not supported by GCC starting with version 4.7. As this change only effects the host, performance issues are an impact on host building and testing alone. Fix clang gtest building on host with BUILD_HOST_64bit. Fix clang build regressions caused by unused fields. Fix x86-64 regression caused by requirement to fire-up quick compiler even in an interpret-only environment. Long-term this code doesn't belong in the quick compiler. Change-Id: Ifc2b10177f40d0724cbbf8dab9653ac03cdd1cee
* Make use of profiling information for dex2oatDave Allison2014-03-071-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+2
| | | | | | | | 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
* Cache field lowering info in mir_graph.Vladimir Marko2014-03-031-2/+50
| | | | Change-Id: I9f9d76e3ae6c31e88bdf3f59820d31a625da020f
* Tell GDB about Quick ART generated codeMark Mendell2014-03-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is actually a lot of work. To do this, we need: .debug_info .debug_abbrev .debug_frame .debug_str These are generated into the OAT file by OatWriter and ElfWriterQuick. Since the Quick ART runtime doesn't use dlopen to load the OAT files, GDB can't find this information. Use the alternate GDB JIT interface, which can be invoked at runtime. To use this interface, an ELF image needs to be built in memory. Read the information from the OAT file, fixup the addresses to point to the real locations, add a symbol table to hold the .text symbol, and then let GDB know about the information, which will be read from the runtime address space. This is quite primitive now, and could be cleaned up considerably. It probably needs symbol table entries for the methods, and descriptions of parameters and return types. Currently only supported for X86. This defaults to enabled for debug builds. Added dexoat --gen-gdb-info and --no-gen-gdb-info flags to override. Change-Id: I4d18b2370f6dfaa00c8cc1925f10717be3bd1a62 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* Make out arguments non-reference types.Ian Rogers2014-03-011-26/+24
| | | | | | Also, tidy some portable related code. Change-Id: I67c8aa52eef8b556ca117ecda1b1e75465ba06a5
* Fix clang to compile and run host tests.Ian Rogers2014-02-281-1/+1
| | | | | | | | | | | | | | Don't use the computed goto interpreter with clang 3.4 as it causes compilation to hang. Avoid inclusion of LLVM_(HOST|DEVICE)_BUILD_MK except for with portable as it sets clang incompatible cflags. Most fixes are self-evident, for the quick dex file method inliner the enums were being used with ostreams, so fix the enums and operator out python script to allow this. Note this change effects portable but this is untestable as portable was broken by ELF file and mc linker changes. Change-Id: Ia54348f6b1bd3f76d3b71c6e8c5f97626386b903
* Add additional constBrian Carlstrom2014-02-241-3/+3
| | | | Change-Id: Ibf60cd4cfbb445189efe2439899f2a7084f1ea63
* Create CompilerOptionsBrian Carlstrom2014-02-241-1/+9
| | | | | | | | | | | | | | | | | | Package up most compiler related options in CompilerOptions. Details include: - Includes compiler filter, method thresholds, SEA IR mode. - Excludes those needed during Runtime::Init such as CompilerCallbacks and VerificationResults. - Pass CompilerOptions to CompilerDriver. - Remove CompilerOptions from Runtime. - Add ability to pass options for app and image dex2oat to runtime via -Xcompiler-option and -Ximage-compiler-option respectively. Other - Replace 2x CompilerCallbacks implementations with one. - Factor out execv code for use by both image and oat generation. - More OatFile error_msg reporting. - DCHECK for SuspendAll found trying to run valgrind. Change-Id: Iecb57da907be0c856d00c3cd634b5042a229e620
* Revert "Annotate used fields."Ian Rogers2014-02-211-3/+0
| | | | | | This reverts commit 7f6cf56942c8469958b273ea968db253051c5b05. Change-Id: Ic389a194c3404ecb5bb563a405bf4a0d6336ea0d
* Annotate used fields.Vladimir Marko2014-02-201-0/+3
| | | | | | | | | Annotate all fields used by a method early during the compilation, check acces rights and record field offset, volatility, etc. Use these annotations when generating code for IGET/IPUT/SGET/SPUT instructions. Change-Id: I4bbf5cca4fecf53c9bf9c93ac1793e2f40c16b5f
* Code cleanup to avoid LLVM dependency when building with quick only.Nicolas Geoffray2014-02-201-2/+0
| | | | Change-Id: I0985c227d775c72fd23975d4c9bf673ba32615c2
* Re-apply: Initial check-in of an optimizing compiler.Nicolas Geoffray2014-02-191-1/+1
| | | | | | | | | The classes and the names are very much inspired by V8/Dart. It currently only supports the RETURN_VOID dex instruction, and there is a pretty printer to check if the building of the graph is correct. Change-Id: I28e125dfee86ae6ec9b3fec6aa1859523b92a893
* Revert "Initial check-in of an optimizing compiler."Nicolas Geoffray2014-02-191-1/+1
| | | | | | | | g++ warnings turned into errors. This reverts commit 68a5fefa90f03fdf5a238ac85c9439c6b03eae96. Change-Id: I09bb95d9cc13764ca8a266c41af04801a34b9fd0
* Initial check-in of an optimizing compiler.Nicolas Geoffray2014-02-191-1/+1
| | | | | | | | | The classes and the names are very much inspired by V8/Dart. It currently only supports the RETURN_VOID dex instruction, and there is a pretty printer to check if the building of the graph is correct. Change-Id: Id5ef1b317ab997010d4e3888e456c26bef1ab9c0
* Rewrite the compiler interface for CompilerDriver.Nicolas Geoffray2014-02-181-27/+7
| | | | Change-Id: I15fa9afe7ffb7283ebda8d788a1e02793e3f75a6
* Merge "Re-apply: Implement cumulative timings for CompilerDriver."Nicolas Geoffray2014-02-111-1/+15
|\
| * Re-apply: Implement cumulative timings for CompilerDriver.Nicolas Geoffray2014-02-111-1/+15
| | | | | | | | | | | | | | The bug was due to how the test infrastructure works: a compiler driver surives the stack where it is allocated. Change-Id: I345fe0e4afb2bd15937233db8afb350f09429558
* | Support Direct Method/Type access for X86Mark Mendell2014-02-101-1/+47
| | | | | | | | | | | | | | | | | | | | | | Thumb generates code to optimize calls to methods within core.oat. Implement this for X86 as well, but take advantage of mov with 32 bit immediate and call relative with 32 bit immediate. Fix some incorrect return locations for long inlines. Change-Id: I1907bdfc7574f3d0aa76c7fad13dc537acdf1ed3 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* | Revert "Revert "Check FastInstance() early for special getters and setters.""Vladimir Marko2014-02-101-0/+12
| | | | | | | | | | | | This reverts commit 632e458dc267fadfb8120be3ab02701e09e64875. Change-Id: I5098c41ee84fbbb39397133a7ecfd367fecebe42
* | Revert "Check FastInstance() early for special getters and setters."Ian Rogers2014-02-081-12/+0
| | | | | | | | | | | | This reverts commit 5dc5727261e87ba8a418e2d0e970c75f67e4ab79. Change-Id: I3299c8ca5c3ce3f2de994bab61ea16a734f1de33
* | Check FastInstance() early for special getters and setters.Vladimir Marko2014-02-071-0/+12
|/ | | | | | | | | | | | Perform the FastInstance() check for getters and setters when they are detected by the inliner. This will help avoid the FastInstance() check for inlining. We also record the field offset and whether the field is volatile and whether the method is static for use when inlining or generating the special accessors. Change-Id: I3f832fc9ae263883b8a984be89a3b7793398b55a
* Object model changes to support 64bit.Ian Rogers2014-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Modify mirror objects so that references between them use an ObjectReference value type rather than an Object* so that functionality to compress larger references can be captured in the ObjectRefererence implementation. ObjectReferences are 32bit and all other aspects of object layout remain as they are currently. Expand fields in objects holding pointers so they can hold 64bit pointers. Its expected the size of these will come down by improving where we hold compiler meta-data. Stub out x86_64 architecture specific runtime implementation. Modify OutputStream so that reads and writes are of unsigned quantities. Make the use of portable or quick code more explicit. Templatize AtomicInteger to support more than just int32_t as a type. Add missing, and fix issues relating to, missing annotalysis information on the mutator lock. Refactor and share implementations for array copy between System and uses elsewhere in the runtime. Fix numerous 64bit build issues. Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
* Add VerfiedMethod to DexCompilationUnit.Vladimir Marko2014-01-281-1/+3
| | | | | | Avoid some mutex locking and map lookups. Change-Id: I8e0486af77e38dcd065569572a6b985eb57f4f63
* Refactor verification results.Vladimir Marko2014-01-281-5/+5
| | | | | | | | Rename VerificationMethodsData to VerificationResults. Create new class VerifiedMethod to hold all the data for a given method. Change-Id: Ife1ac67cede20f3a2f9c7f5345f08a851cf1ed20