12f7423a2bb4bfab76700d84eb6d4338d211983a |
|
14-Jan-2015 |
Mathieu Chartier <mathieuc@google.com> |
Print more info in MarkSweep::VerifyRoot Refactored old root callback to use a new class called RootInfo. RootInfo contains all the relevant info related to the root associated with the callback. The MarkSweep::VerifyRoot function now uses this info to print the StackVisitor's described location if the GC root is of the type kRootJavaFrame. Some other cleanup. Example output: E/art (12167): Tried to mark 0x123 not contained by any spaces E/art (12167): Attempting see if it's a bad root E/art (12167): Found invalid root: 0x123 with type RootJavaFrame E/art (12167): Location=Visiting method 'void java.lang.Runtime.gc()' at dex PC 0xffffffff (native PC 0x0) vreg=0 Bug: 18588862 Change-Id: Ic5a2781f704e931265ffb3621c2eab4b2e25f60f
|
ea1c3d77b92b30ec527f2ca5bfe316a882b698e0 |
|
01-Dec-2014 |
Mathieu Chartier <mathieuc@google.com> |
Set dex_cache_strings_ when we call Class::SetDexCache Ensures that these two variables never get out of sync. The error was presumably related to not doing this for proxy classes. This caused java code which was looking at the dex_cache_strings_ field to incorrectly access a null array. Bug: 18548887 Change-Id: If53c6ade3588b82a480d6674dfbd5caa2e5069fd
|
1d0611c7e6721bd9115d652da74d2584ff3f192b |
|
01-Nov-2014 |
Andreas Gampe <agampe@google.com> |
ART: Add miranda checking Add a test for resolution of miranda methods across dex-files. See CL 112688 and b/18193682 for the code change. Fix the test script to support no-verify again. Weaken the dex cache check to a check whether the found method is a miranda method. This will penalize miranda methods, as they will always have to be resolved by name, but does not require the multi-step load of the method's dex cache. Bug: 18193682 (cherry picked from commit 2b0fa5ba4a8f07ee243452003bf93418d30e9448) Change-Id: I1dae2a9ec0985dc8625acd7dd5686a5d3cdc8888
|
9a783d6a0cb437fc0d9ffcc84502912f3d1cb73b |
|
31-Oct-2014 |
Brian Carlstrom <bdc@google.com> |
Fix FindDeclaredVirtualMethod(DexCache...) for miranda methods If a class in classes.dex implements an interface from classes2.dex, the miranda method will be in the dex cache for classes2.dex, but pointed to by the virtual methods of the class in the dex caches for classes.dex. Therefore the fast path for DexCache::ResolveMethod that searches via class and superclass virtual methods should ensure that any method matching on dex method_idx should be from the same dex cache as the class itself, which is not the case for miranda methods. Bug: 18193682 Change-Id: I10da4f5472e929b3dc0be58051a726a4bc14e438
|
1fb463e42cf1d67595cff66d19c0f99e3046f4c4 |
|
24-Oct-2014 |
Mathieu Chartier <mathieuc@google.com> |
Optimize method linking Added more inlining, removed imt array allocation and replaced it with a handle scope. Removed some un-necessary handle scopes. Added logic to base interface method tables from the superclass so that we dont need to reconstruct for every interface (large win). Facebook launch Dalvik KK MR2: TotalTime: 3165 TotalTime: 3652 TotalTime: 3143 TotalTime: 3298 TotalTime: 3212 TotalTime: 3211 Facebook launch TOT before: WaitTime: 3702 WaitTime: 3616 WaitTime: 3616 WaitTime: 3687 WaitTime: 3742 WaitTime: 3767 After optimizations: WaitTime: 2903 WaitTime: 2953 WaitTime: 2918 WaitTime: 2940 WaitTime: 2879 WaitTime: 2792 LinkInterfaceMethods no longer one of the hottest methods, new list: 4.73% art::ClassLinker::LinkVirtualMethods(art::Thread*, art::Handle<art::mirror::Class>) 3.07% art::DexFile::FindClassDef(char const*) const 2.94% art::mirror::Class::FindDeclaredStaticField(art::mirror::DexCache const*, unsigned int) 2.90% art::DexFile::FindStringId(char const*) const Bug: 18054905 Bug: 16828525 Change-Id: I27cc70178fd3655fbe5a3178887fcba189d21321
|
cb6b0f31ede2275e79e6199ec391147585a37a2a |
|
12-Aug-2014 |
Ian Rogers <irogers@google.com> |
Avoid use of std::string where we have const char*. Removing the ClassHelper caused std::string creation for all calls to Class::GetDescriptor and a significant performance regression. Make the std::string an out argument so the caller can maintain it and its life time while allowing GetDescriptor to return the common const char* case. Don't generate GC maps when compilation is disabled. Remove other uses of std::string that are occuring on critical paths. Use the cheaper SkipClass in CompileMethod in CompilerDriver. Specialize the utf8 as utf16 comparison code for the common shorter byte encoding. Force a bit of inlining, remove some UNLIKELYs (they are prone to pessimizing code), add some LIKELYs. x86-64 host 1-thread interpret-only of 57 apks: Before: 29.539s After: 23.467s Regular compile: Before: 1m35.347s After: 1m20.056s Bug: 16853450 Change-Id: Ic705ea24784bee24ab80084d06174cbf87d557ad Conflicts: runtime/utils.cc
|
0e7f37de5bcebb413712eddd1831f30bd0818664 |
|
16-Jul-2014 |
Mingyao Yang <mingyao@google.com> |
Set vtable in class object to null after linking. This is follow-up work of embedding imt and vtable for faster interface/virtual call dispatching. Once vtable becomes embedded, the original vtable is nulled. (cherry picked from commit 2cdbad7c62f126581ec5177104de961c4d71adaa) Change-Id: I6acdcd1ee560d387fb77c55c58bbe3598c197ba1
|
e19f2b00eebd61e73761ab531866654f08968711 |
|
16-Jul-2014 |
Mingyao Yang <mingyao@google.com> |
Set vtable in class object to null after linking. This is follow-up work of embedding imt and vtable for faster interface/virtual call dispatching. Once vtable becomes embedded, the original vtable is nulled. (cherry picked from commit 2cdbad7c62f126581ec5177104de961c4d71adaa) Change-Id: I6acdcd1ee560d387fb77c55c58bbe3598c197ba1
|
94f7b49578b6aaa80de8ffed230648d601393905 |
|
23-Jul-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Add GcRoot to clean up and enforce read barriers. Introduce a value-type wrapper around Object* for GC roots so that 1) we won't have to directly add the read barrier code in many places and 2) we can avoid accidentally bypassing/missing read barriers on GC roots (the GcRoot interface ensures that the read barrier is executed on a read). The jdwp test passed. Bug: 12687968 Change-Id: Ib167c7c325b3c7e3900133578815f04d219972a1
|
2cdbad7c62f126581ec5177104de961c4d71adaa |
|
16-Jul-2014 |
Mingyao Yang <mingyao@google.com> |
Set vtable in class object to null after linking. This is follow-up work of embedding imt and vtable for faster interface/virtual call dispatching. Once vtable becomes embedded, the original vtable is nulled. Change-Id: I307696657d1e283654169dbecb8f7815c42bbabc
|
0fbd6e6ec3241b7163b95f9f001bfe9b08f8b200 |
|
18-Jul-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Fix two read barrier bugs introduced in CL 97882. Bug: 12687968 Change-Id: Ib28da4c33977cc58b09913ef5b738dec75365714
|
22d5e735f403c57525fe868304c7123f0ce66399 |
|
16-Jul-2014 |
Ian Rogers <irogers@google.com> |
Remove object_utils.h. Break into object_lock, field_helper and method_helper. Clean up header files following this. Also tidy some of the Handle code in response to compiler errors when resolving the changes in this CL. Change-Id: I73e63015a0f02a754d0866bfaf58208aebcaa295
|
59fe711f88191cd8ca1a386c4fa0d2f9e484af50 |
|
14-Jul-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix infinite loop when calling SetStatus after OOM. There was a problem where we would call SetStatus when we had an OOM error. This results in attempting to find the ExceptionInInitializer class which if not loaded does more allocations resulting in an infinite loop. Also some cleanup addressing other comments. Bug: 16082350 (cherry picked from commit fd22d5bada15d95b5ea8ab5a4dda39077e1a54ee) Change-Id: Ie291eb0f52ba9c63f24591fae691dd9f393e6ccb
|
fd22d5bada15d95b5ea8ab5a4dda39077e1a54ee |
|
14-Jul-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix infinite loop when calling SetStatus after OOM. There was a problem where we would call SetStatus when we had an OOM error. This results in attempting to find the ExceptionInInitializer class which if not loaded does more allocations resulting in an infinite loop. Also some cleanup addressing other comments. Bug: 16082350 Change-Id: I5c1e638a03ddf700ab4e9cad9a3077d2b1b26c43
|
98d1cc8033251c93786e2fa8c59a2e555a9493be |
|
16-May-2014 |
Mingyao Yang <mingyao@google.com> |
Improve performance of invokevirtual/invokeinterface with embedded imt/vtable Add an embedded version of imt/vtable into class object. Both tables start at fixed offset within class object so method/entry point can be loaded directly from class object for invokeinterface/invokevirtual. Bug: 8142917 Change-Id: I4240d58cfbe9250107c95c0708c036854c455968
|
4f1ebc2b86c8467d1ecb3ec655316e6d7ee8b8b5 |
|
25-Jun-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Add read barriers to the constant roots. This change makes it possible to concurrently scan the constant roots (the roots visited by Runtime::VisitConstantRoots()) such as the class of java.lang.Class by adding read barriers. Bug: 12687968 Change-Id: If1afea471c4e1093688d2db37b7f1fc2742edeef
|
004644fe87046b965442b1ee1008b7206817d187 |
|
18-Jun-2014 |
Brian Carlstrom <bdc@google.com> |
Fix GetMethodID to find an interface method from a super-interface Bug: 15651032 Change-Id: I5df113e9489a1615e901f03bed92ed2a1a42bd67
|
7048ae42d2b02d62110e297221460cacf1f6db73 |
|
02-Jun-2014 |
Ian Rogers <irogers@google.com> |
Make class status volatile. Discourage loads and stores from reordering around the status being updated. Bug: 15347354 (cherry-picked from 03dbc04d1d5a3bd62801989b16e994a9ed0dafb5) Change-Id: I29a4144bd3a145017831540ce1130da5401e39c0
|
9f1020305292a21fd14a402b189c765a125226ab |
|
23-May-2014 |
Sebastien Hertz <shertz@google.com> |
Fix exception reporting from interpreter To comply with JDWP exception report rules, we must report an exception at the location of the throw (or the first instruction encountered after a native call). To do this, we use the CatchLocationFinder visitor to look for a catch handler until we reach a native frame or the top frame. Because interpreter handles pending exception on a method-by-method basis, we need a flag to remember we already reported the exception and avoid reporting it multiple times when unwinding methods. The drawback is we need to maintain the state of this flag. We clear it when the exception is cleared. In the case we temporarily clear the exception (when finding a catch handler for instance), we restore the flag to its previous value at the same time we restore the pending exception. Bump oat version to force recompilation because we modify Thread offsets. Bug: 14402770 Change-Id: Ic059c58f80b2023b118038301f8f0a24f1e18241
|
bfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe |
|
22-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change MethodHelper to use a Handle. 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
|
61c5ebc6aee2cac1c363de6fbdac25ada1697fdb |
|
06-Jun-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change FieldHelper to use a handle. Fixed compaction bugs related to FieldHelper::GetType in: artSet32InstanceFromCode SetFieldValueImpl CheckReceiver Field_set interpreter::DoFieldPut MethodVerifier::VerifyISGet MethodVerifier::VerifyISPut MethodVerifier::VerifyIGetQuick Bug: 13077697 Change-Id: I7de9ded2893b5568d43e4daa86fd135bf5508b72
|
4206eb5d86d3a2406361e59b2018152b2485cced |
|
05-Jun-2014 |
Sebastien Hertz <shertz@google.com> |
Fix crash in JDWP ReferenceType.SourceFile command Updates Dbg::GetSourceFile to return ABSENT_INFORMATION error code when Class::GetSourceFile returns nullptr. This happens if the class has no source file information. Updates Class:GetSourceFile to return nullptr for classes which have no ClassDef item like generated classes. This allows to remove the IsProxyClass test from Dbg::GetSourceFile. Adds this test in proxy_test. Bug: 15426710 Change-Id: I019da4ced83778d5264484c43b225f8b5c95632e
|
03dbc04d1d5a3bd62801989b16e994a9ed0dafb5 |
|
02-Jun-2014 |
Ian Rogers <irogers@google.com> |
Make class status volatile. Discourage loads and stores from reordering around the status being updated. Bug: 15347354 Change-Id: Ice805cb834617747c8209e98a142d3e5c7585719
|
f832284dd847ff077577bb5712225430bbbb3b67 |
|
16-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Delete ClassHelper and fix compaction bug in GetDirectInterface 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
|
eb8167a4f4d27fce0530f6724ab8032610cd146b |
|
08-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add Handle/HandleScope and delete SirtRef. 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
|
25023c744c4388a6459b21cc3babf8c602b024a2 |
|
09-May-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Make it possible to disable read barriers in Class::GetObjectSize() This is a leftover from cl/91831 (commit 9103c86a98524e9ddfd14f8cee56e919f68eee9b) that attempted to make it possible to disable read barriers in Object::SizeOf(). Bug: 12687968 Change-Id: I2b05076832936881ec61bc21b6eb6b7c04e0a1f0
|
8194963098247be6bca9cc4a54dbfa65c73e8ccc |
|
02-May-2014 |
Vladimir Marko <vmarko@google.com> |
Replace CountOneBits and __builtin_popcount with POPCOUNT. Clean up utils.h, make some functions constexpr. Change-Id: I2399100280cbce81c3c4f5765f0680c1ddcb5883
|
b0fa5dc7769c1e054032f39de0a3f6d6dd06f8cf |
|
29-Apr-2014 |
Ian Rogers <irogers@google.com> |
Force inlining on trivial accessors. Make volatility for GetFieldObject a template parameter. Move some trivial mirror::String routines to a -inl.h. Bug: 14285442 Change-Id: Ie23b11d4f18cb15a62c3bbb42837a8aaf6b68f92
|
9103c86a98524e9ddfd14f8cee56e919f68eee9b |
|
22-Apr-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
More code for the read barrier support. Make it possible to disable the RB in Object::SizeOf() (and the functions it calls transitively) which the collector will need to call to get the size of an object when copying. Add Object::AtomicSetReadBarrierPointer() for atomic write of a RB pointer. Bug: 12687968 Change-Id: Ibedd252860ac7ccd17e4e7d71b377a8892b48ff0
|
9837939678bb5dcba178e5fb00ed59b5d14c8d9b |
|
25-Feb-2014 |
Ian Rogers <irogers@google.com> |
Avoid std::string allocations for finding an array class. Introduce ClassLinker::FindArrayClass which performs an array class lookup given the element/component class. This has a 16 element cache of recently looked up arrays. Pass the current thread to ClassLinker Find .. Class routines to avoid calls to Thread::Current(). Avoid some uses of FindClass in the debugger where WellKnownClasses is a faster and more compacting GC friendly alternative. Change-Id: I60e231820b349543a7edb3ceb9cf1ce92db3c843
|
815873ecc312b1d231acce71e1a16f42cdaf09f2 |
|
14-Feb-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change root visitor to use Object**. Simplifies code and improves the performance of root visiting since we usually don't need to check to see if the object moved. Change-Id: Iba998f5a15ae1fa1b53ca5226dd2168a411196cf
|
d2fe10a3a34af171bf1631219cd2d6ff6b7778b5 |
|
15-Jan-2014 |
Sebastien Hertz <shertz@google.com> |
Remove blacklist Removes the class initialization blacklist and use transaction to detect and revert class initialization attempting to invoke native method. This only concerns class initialization happening at compilation time when generating an image (like boot.art for the system). In transactional mode, we log every object's field assignment and array update. Therefore we're able to abort a transaction to restore values of fields and array as they were before the transaction starts. We also log changes to the intern string table so we can restore its state prior to transaction start. Since transactional mode only happens at compilation time, we don't need to log all these changes at runtime. In order to reduce the overhead of testing if transactional mode is on/off, we templatize interfaces of mirror::Object and mirror::Array, respectively responsible for setting a field and setting an array element. For various reasons, we skip some specific fields from transaction: - Object's class and array's length must remain unchanged so garbage collector can compute object's size. - Immutable fields only set during class loading: list of fields, method, dex caches, vtables, ... as all classes have been loaded and verified before a transaction occurs. - Object's monitor for performance reason. Before generating the image, we browse the heap to collect objects that need to be written into it. Since the heap may still holds references to unreachable objects due to aborted transactions, we trigger one collection at the end of the class preinitialization phase. Since the transaction is held by the runtime and all compilation threads share the same runtime, we need to ensure only one compilation thread has exclusive access to the runtime. To workaround this issue, we force class initialization phase to run with only one thread. Note this is only done when generating image so application compilation is not impacted. This issue will be addressed in a separate CL. Bug: 9676614 Change-Id: I221910a9183a5ba6c2b99a277f5a5a68bc69b5f9
|
83c8ee000d525017ead8753fce6bc1020249b96a |
|
28-Jan-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add root types and thread id to root visiting. Enables us to pass the root type and thread id to hprof. Bug: 12680863 Change-Id: I6a0f1f9e3aa8f9b4033d695818ae7ca3460d67cb
|
ef7d42fca18c16fbaf103822ad16f23246e2905d |
|
06-Jan-2014 |
Ian Rogers <irogers@google.com> |
Object model changes to support 64bit. 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
|
692fafd9778141fa6ef0048c9569abd7ee0253bf |
|
30-Nov-2013 |
Mathieu Chartier <mathieuc@google.com> |
Thread local bump pointer allocator. Added a thread local allocator to the heap, each thread has three pointers which specify the thread local buffer: start, cur, and end. When the remaining space in the thread local buffer isn't large enough for the allocation, the allocator allocates a new thread local buffer using the bump pointer allocator. The bump pointer space had to be modified to accomodate thread local buffers. These buffers are called "blocks", where a block is a buffer which contains a set of adjacent objects. Blocks aren't necessarily full and may have wasted memory towards the end. Blocks have an 8 byte header which specifies their size and is required for traversing bump pointer spaces. Memory usage is in between full bump pointer and ROSAlloc since madvised memory limits wasted ram to an average of 1/2 page per block. Added a runtime option -XX:UseTLAB which specifies whether or not to use the thread local allocator. Its a NOP if the garbage collector is not the semispace collector. TODO: Smarter block accounting to prevent us reading objects until we either hit the end of the block or GetClass() == null which signifies that the block isn't 100% full. This would provide a slight speedup to BumpPointerSpace::Walk. Timings: -XX:HeapMinFree=4m -XX:HeapMaxFree=8m -Xmx48m ritzperf memalloc: Dalvik -Xgc:concurrent: 11678 Dalvik -Xgc:noconcurrent: 6697 -Xgc:MS: 5978 -Xgc:SS: 4271 -Xgc:CMS: 4150 -Xgc:SS -XX:UseTLAB: 3255 Bug: 9986565 Bug: 12042213 Change-Id: Ib7e1d4b199a8199f3b1de94b0a7b6e1730689cad
|
c528dba35b5faece51ca658fc008b688f8b690ad |
|
26-Nov-2013 |
Mathieu Chartier <mathieuc@google.com> |
Enable moving classes. Slight reduction in Zygote size, memory savings are in the noise. Before: Zygote size: 8739224 After: Zygote size: 8733568 Fixed a bug where we didn't set the concurrent start bytes after switching the allocator from bump pointer to ROSAlloc in the zygote. This caused excessive memory usage. Added the method verifiers as roots to fix an issue caused by RegTypes holding a Class*. Added logic to clear card table in the SemiSpace collector, this reduces DalvikOther from ~2400k -> ~1760k when using the SemiSpace collector. Added a missing lock to the timing loggers which caused a rare one time crash in std::set. Bug: 11771255 Bug: 8499494 Bug: 10802951 Change-Id: I99d2b528cd51c1c5ed7012e3220b3aefded680ae
|
590fee9e8972f872301c2d16a575d579ee564bee |
|
13-Sep-2013 |
Mathieu Chartier <mathieuc@google.com> |
Compacting collector. The compacting collector is currently similar to semispace. It works by copying objects back and forth between two bump pointer spaces. There are types of objects which are "non-movable" due to current runtime limitations. These are Classes, Methods, and Fields. Bump pointer spaces are a new type of continuous alloc space which have no lock in the allocation code path. When you allocate from these it uses atomic operations to increase an index. Traversing the objects in the bump pointer space relies on Object::SizeOf matching the allocated size exactly. Runtime changes: JNI::GetArrayElements returns copies objects if you attempt to get the backing data of a movable array. For GetArrayElementsCritical, we return direct backing storage for any types of arrays, but temporarily disable the GC until the critical region is completed. Added a new runtime call called VisitObjects, this is used in place of the old pattern which was flushing the allocation stack and walking the bitmaps. Changed image writer to be compaction safe and use object monitor word for forwarding addresses. Added a bunch of added SIRTs to ClassLinker, MethodLinker, etc.. TODO: Enable switching allocators, compacting on background, etc.. Bug: 8981901 Change-Id: I3c886fd322a6eef2b99388d19a765042ec26ab99
|
dfb325e0ddd746cd8f7c2e3723b3a573eb7cc111 |
|
30-Oct-2013 |
Ian Rogers <irogers@google.com> |
Don't use UTF16 length as length for MUTF8. Bug 11367555. Change-Id: Ia0b07072a1a49d435c3b71ed9a668b316b7ff5d8
|
1eb512d33f94d1dd7ea38263307ba0f7a0dfa653 |
|
19-Oct-2013 |
Ian Rogers <irogers@google.com> |
Fast JNI support. Use a modifier to signal a native method is a fast JNI method. If the modifier is set then don't perform runnable transitions. Change-Id: I7835b4d837bfdd1cb8e2d54b919c0d5e6cf90499
|
241b5de2d3cf06868ac31f1153aa0b32ddb07b20 |
|
10-Oct-2013 |
Ian Rogers <irogers@google.com> |
Clinits may not have the kAccConstructor flag. Bug: 11157540 Set the clinit access flag when we load the method and warn about badly formed access flags. Change-Id: I515c692095051f84f98510722ab764591185918e
|
d9c4fc94fa618617f94e1de9af5f034549100753 |
|
02-Oct-2013 |
Ian Rogers <irogers@google.com> |
Inflate contended lock word by suspending owner. Bug 6961405. Don't inflate monitors for Notify and NotifyAll. Tidy lock word, handle recursive lock case alongside unlocked case and move assembly out of line (except for ARM quick). Also handle null in out-of-line assembly as the test is quick and the enter/exit code is already a safepoint. To gain ownership of a monitor on behalf of another thread, monitor contenders must not hold the monitor_lock_, so they wait on a condition variable. Reduce size of per mutex contention log. Be consistent in calling thin lock thread ids just thread ids. Fix potential thread death races caused by the use of FindThreadByThreadId, make it invariant that returned threads are either self or suspended now. Code size reduction on ARM boot.oat 0.2%. Old nexus 7 speedup 0.25%, new nexus 7 speedup 1.4%, nexus 10 speedup 2.24%, nexus 4 speedup 2.09% on DeltaBlue. Change-Id: Id52558b914f160d9c8578fdd7fc8199a9598576a
|
d91d6d6a80748f277fd938a412211e5af28913b1 |
|
26-Sep-2013 |
Ian Rogers <irogers@google.com> |
Introduce Signature type to avoid string comparisons. Method resolution currently creates strings to then compare with strings formed from methods in other dex files. The temporary strings are purely created for the sake of comparisons. This change creates a new Signature type that represents a method signature but not as a string. This type supports comparisons and so can be used when searching for methods in resolution. With this change malloc is no longer the hottest method during dex2oat (now its memset) and allocations during verification have been reduced. The verifier is commonly what is populating the dex cache for methods and fields not declared in the dex file itself. Change-Id: I5ef0542823fbcae868aaa4a2457e8da7df0e9dae
|
fc0e94bed3f88ed7e50854fd8dfaf5dcb345250f |
|
24-Sep-2013 |
Ian Rogers <irogers@google.com> |
StringPiece clean up. Profile guided clean up. Try to avoid creating StringPieces with the contents of a dex file where the length is known. Try to avoid RegTypeCache::FromDescriptor when there's a class available. Make ConstantType::ConstantValue inlinable. Saving of about 50ms from a 2 threaded ThinkFree compile on host. Change-Id: I47a12c3c76f46e2c9805be1c3a3e3870fe1f5d85
|
ee39a10e45a6a0880e8b829525c40d6055818560 |
|
19-Sep-2013 |
Ian Rogers <irogers@google.com> |
Use class def index from java.lang.Class. Bug: 10244719 This removes the computation of the dex file index, when necessary this is computed by searching the dex file. Its only necessary in dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the latter not showing up significantly in profiling with this change. (cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69) Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
|
8b2c0b9abc3f520495f4387ea040132ba85cae69 |
|
19-Sep-2013 |
Ian Rogers <irogers@google.com> |
Use class def index from java.lang.Class. Bug: 10244719 Depends on: https://googleplex-android-review.git.corp.google.com/362363 This removes the computation of the dex file index, when necessary this is computed by searching the dex file. Its only necessary in dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the latter not showing up significantly in profiling with this change. Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
|
967a0adf8b93a23d2a8fef82e06bd913db94ac19 |
|
11-Sep-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
More allocation code optimizations. - Inline Class::AllocObject() and Array::Alloc(). - Inline some short Mutex functions and add LIKELY/UNLIKELY to some Mutex functions. - This change improves the Ritz MemAllocTest by ~6% on Nexus 4 and ~10% on host. Bug: 9986565 Change-Id: I1606c74ddb21676cbc1de1a40e9b076fc23eaea4
|
7dfb28c066159e6cde8181720f0c451a700ef966 |
|
22-Aug-2013 |
Ian Rogers <irogers@google.com> |
Don't scan image space when starting runtime. Bug 10432288. Find Classes and Strings from dex caches lazily rather than when the image is loaded. Make class status changes do notifies when there can be waiters. For Class lookup there's a pathology if we always search dex caches and so after 1000 failures move all classes into the class table. Be consistent in using "const char*" for class linker descriptors as this most easily agrees with the type in the dex file. Improve the intern run-test so that it has a case of a literal contained in the image. Modify image_test to allow any valid lock word rather than expecting 0, ideally we wouldn't see inflated monitors but we do due to NotifyAll (see bug 6961405). Change-Id: Ia9bfa748eeccb9b4498784b97c6823141b1f6db8
|
8f3c9ae38df2460940a26dff889a84430b6c38d3 |
|
21-Aug-2013 |
Ian Rogers <irogers@google.com> |
Don't allow class status to go backward except for error. Allow greater parallelism of initialization. Bug 10393546. Change-Id: Ic194ed490bb0a986250c09fcf335eb1be9714657
|
ea46f950e7a51585db293cd7f047de190a482414 |
|
30-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Refactor java.lang.reflect implementation Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1. Move to ArtMethod/Field instead of AbstractMethod/Field and have java.lang.reflect APIs delegate to ArtMethod/ArtField. Bug: 10014286. Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
|
0cd7ec2dcd8d7ba30bf3ca420b40dac52849876c |
|
18-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Fix cpplint whitespace/blank_line issues Change-Id: Ice937e95e23dd622c17054551d4ae4cebd0ef8a2
|
7940e44f4517de5e2634a7e07d58d0fb26160513 |
|
12-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Create separate Android.mk for main build targets 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
|