bad9c7b7f88689133cae59d9ccae231822a2020c |
|
14-Jun-2015 |
Mathieu Chartier <mathieuc@google.com> |
New experimental GC stress mode Tries to do a GC for every unique call stack (up to 16 frames). The goal is to catch moving GC bugs and lock violations without being rediculously slow. Some tests fail on 64 bits, 32 bit host doesn't work. N5 is booting. Added runtime -Xgc options: gcstress and nogcstress. Bug: 21664466 (cherry picked from commit 310008008c90fea246efd00cb99ee7ded97c5209) Change-Id: Icb8e420f2048e8ee83bcca7937563166a2638f5c
|
3d21bdf8894e780d349c481e5c9e29fe1556051c |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move mirror::ArtMethod to native Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 (cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d Fix some ArtMethod related bugs Added root visiting for runtime methods, not currently required since the GcRoots in these methods are null. Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes --trace run-tests 005, 044. Fixed optimizing compiler bug where we used a normal stack location instead of double on ARM64, this fixes the debuggable tests. TODO: Fix JDWP tests. Bug: 19264997 Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3 ART: Fix casts for 64-bit pointers on 32-bit compiler. Bug: 19264997 Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457 Fix JDWP tests after ArtMethod change Fixes Throwable::GetStackDepth for exception event detection after internal stack trace representation change. Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of proxy method. Bug: 19264997 Change-Id: I363e293796848c3ec491c963813f62d868da44d2 Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0 Fix bogus image test assert Previously we were comparing the size of the non moving space to size of the image file. Now we properly compare the size of the image space against the size of the image file. Bug: 19264997 Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a [MIPS64] Fix art_quick_invoke_stub argument offsets. ArtMethod reference's size got bigger, so we need to move other args and leave enough space for ArtMethod* and 'this' pointer. This fixes mips64 boot. Bug: 19264997 Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
|
41b175aba41c9365a1c53b8a1afbd17129c87c14 |
|
19-May-2015 |
Vladimir Marko <vmarko@google.com> |
ART: Clean up arm64 kNumberOfXRegisters usage. Avoid undefined behavior for arm64 stemming from 1u << 32 in loops with upper bound kNumberOfXRegisters. Create iterators for enumerating bits in an integer either from high to low or from low to high and use them for <arch>Context::FillCalleeSaves() on all architectures. Refactor runtime/utils.{h,cc} by moving all bit-fiddling functions to runtime/base/bit_utils.{h,cc} (together with the new bit iterators) and all time-related functions to runtime/base/time_utils.{h,cc}. Improve test coverage and fix some corner cases for the bit-fiddling functions. Bug: 13925192 (cherry picked from commit 80afd02024d20e60b197d3adfbb43cc303cf29e0) Change-Id: I905257a21de90b5860ebe1e39563758f721eab82
|
848f70a3d73833fc1bf3032a9ff6812e429661d9 |
|
15-Jan-2014 |
Jeff Hao <jeffhao@google.com> |
Replace String CharArray with internal uint16_t array. Summary of high level changes: - Adds compiler inliner support to identify string init methods - Adds compiler support (quick & optimizing) with new invoke code path that calls method off the thread pointer - Adds thread entrypoints for all string init methods - Adds map to verifier to log when receiver of string init has been copied to other registers. used by compiler and interpreter Change-Id: I797b992a8feb566f9ad73060011ab6f51eb7ce01
|
2cebb24bfc3247d3e9be138a3350106737455918 |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Replace NULL with nullptr Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
|
fc58af45e342ba9e18bbdf597f205a58ec731658 |
|
17-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Add AbstractMethod, Constructor, Method Moves functionality to ART from libcore. Precursor to moving ArtMethods to native. Mostly performance improvements. N5 perf before (irrelevant results removed): Class_getConstructor 962.87 =========== Class_getDeclaredMethod 2394.37 ============================ Class_getMethod 2509.20 ============================== Class_newInstance 1999.81 ======================= Method_invokeI 1439.02 ================= Method_invokePreBoxedI 1415.82 ================ Method_invokeStaticI 1456.24 ================= Method_invokeStaticPreBoxedI 1427.32 ================= Method_invokeStaticV 814.47 ========= Method_invokeV 816.56 ========= After: benchmark ns linear runtime Class_getConstructor 1302.04 ================ Class_getDeclaredMethod 1459.01 ================== Class_getMethod 1560.40 =================== Class_newInstance 2029.94 ========================= Method_invokeI 1312.89 ================ Method_invokePreBoxedI 1255.01 =============== Method_invokeStaticI 1289.13 =============== Method_invokeStaticPreBoxedI 1196.52 ============== Method_invokeStaticV 790.82 ========= Method_invokeV 791.73 ========= Performance improvements are more than just fixing regressions introduced in: http://android-review.googlesource.com/#/c/146069/ Bug: 19264997 Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce
|
3481ba2c4e4f3aa80d8c6d50a9f85dacb56b508b |
|
13-Apr-2015 |
Vladimir Marko <vmarko@google.com> |
ART: Clean up includes. Reduce dependencies to improve incremental build times. Break up circular dependency involving class_linker-inl.h. Change-Id: I4be742c5c2b5cd9855beea86630fd68aab76b0db
|
c785344b87221f5e4e6473e5b762e4e61fe65dcf |
|
27-Mar-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move ArtField to native Add linear alloc. Moved ArtField to be native object. Changed image writer to put ArtFields after the mirror section. Savings: 2MB on low ram devices 4MB on normal devices Total PSS measurements before (normal N5, 95s after shell start): Image size: 7729152 bytes 23112 kB: .NonMoving 23212 kB: .NonMoving 22868 kB: .NonMoving 23072 kB: .NonMoving 22836 kB: .NonMoving 19618 kB: .Zygote 19850 kB: .Zygote 19623 kB: .Zygote 19924 kB: .Zygote 19612 kB: .Zygote Avg: 42745.4 kB After: Image size: 7462912 bytes 17440 kB: .NonMoving 16776 kB: .NonMoving 16804 kB: .NonMoving 17812 kB: .NonMoving 16820 kB: .NonMoving 18788 kB: .Zygote 18856 kB: .Zygote 19064 kB: .Zygote 18841 kB: .Zygote 18629 kB: .Zygote 3499 kB: .LinearAlloc 3408 kB: .LinearAlloc 3424 kB: .LinearAlloc 3600 kB: .LinearAlloc 3436 kB: .LinearAlloc Avg: 39439.4 kB No reflection performance changes. Bug: 19264997 Bug: 17643507 Change-Id: I10c73a37913332080aeb978c7c94713bdfe4fe1c
|
bb87e0f1a52de656bc77cb01cb887e51a0e5198b |
|
03-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Refactor and improve GC root handling Changed GcRoot to use compressed references. Changed root visiting to use virtual functions instead of function pointers. Changed root visting interface to be an array of roots instead of a single root at a time. Added buffered root marking helper to avoid dispatch overhead. Root marking seems a bit faster on EvaluateAndApplyChanges due to batch marking. Pause times unaffected. Mips64 is untested but might work, maybe. Before: MarkConcurrentRoots: Sum: 67.678ms 99% C.I. 2us-664.999us Avg: 161.138us Max: 671us After: MarkConcurrentRoots: Sum: 54.806ms 99% C.I. 2us-499.986us Avg: 136.333us Max: 602us Bug: 19264997 Change-Id: I0a71ebb5928f205b9b3f7945b25db6489d5657ca
|
e01a520fe0010f8abd344b5ed7120787d7ed1d71 |
|
19-Mar-2015 |
Hiroshi Yamauchi <yamauchi@google.com> |
Assembly TLAB allocation fast path for x86_64. TODO: resolved/initialized cases, other architectures. Bug: 9986565 Change-Id: If6df3449a3b2f5074d11babdda0fd2791fd54946
|
5b783e66b26b7b6ee13d344f4b77f6b7c47c4723 |
|
19-Mar-2015 |
Hiroshi Yamauchi <yamauchi@google.com> |
Fix 003-omnibus-opcodes flaky failures with GSS GC. Fix a moving GC bug in Class::SetStatus(). Bug: 19828874 Change-Id: I6bef49a7ce964e8a7e316f282aaf1b8544efe76d
|
7f418db815f0eaef5b2f43e1f06fb8773a415494 |
|
26-Nov-2014 |
Sebastien Hertz <shertz@google.com> |
JDWP: fix breakpoint for method in the image When we set a breakpoint in a compiled method, we deoptimize it by changing its entrypoint so it is executed with the interpreter. However, methods in the image can be called with their direct code pointer, ignoring the updated entrypoint. In that case, the method is not executed with the interpreter and we miss the breakpoint. This CL avoids that situation by forcing a full deoptimization so everything runs with the interpreter. However, if the image has been compiled in PIC mode, we keep using selective deoptimization because direct code pointer is not used in this mode. Bug: 17965285 (cherry picked from commit 6963e44331258b131bcc0599b868ba15902d6d22) Change-Id: I9bf738f89b9eb6d18733503216b376b8a1d181f5
|
6963e44331258b131bcc0599b868ba15902d6d22 |
|
26-Nov-2014 |
Sebastien Hertz <shertz@google.com> |
JDWP: fix breakpoint for method in the image When we set a breakpoint in a compiled method, we deoptimize it by changing its entrypoint so it is executed with the interpreter. However, methods in the image can be called with their direct code pointer, ignoring the updated entrypoint. In that case, the method is not executed with the interpreter and we miss the breakpoint. This CL avoids that situation by forcing a full deoptimization so everything runs with the interpreter. However, if the image has been compiled in PIC mode, we keep using selective deoptimization because direct code pointer is not used in this mode. Bug: 17965285 Change-Id: Icaf8cbb7fe9ad01d36f7378c59d50d9ce42ae57f
|
91a6dc41003cdd22073e72fd5425df8e95b1c172 |
|
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 (cherry picked from commit ea1c3d77b92b30ec527f2ca5bfe316a882b698e0) Change-Id: I022d9311b38b61e160ed70e3c5d9639797adb29c
|
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
|
cd195fe131842ad9ca7909203d479d325feaf9dd |
|
26-Nov-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add a way to change the IMT size Useful for having smaller imts on memory constrainted devices. Setting ART_IMT_SIZE=x will change the size of the IMT. (cherry picked from commit 8ee96437f8cd24e1eb0b2adc6cef3346ed4b6a98) Change-Id: Ia74946ffc57ad32de5a8d60be3412462f19f8076
|
8ee96437f8cd24e1eb0b2adc6cef3346ed4b6a98 |
|
26-Nov-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add a way to change the IMT size Useful for having smaller imts on memory constrainted devices. Setting ART_IMT_SIZE=x will change the size of the IMT. Bug: 17643507 Change-Id: Ia6bcfcb067c7e21c7f3003cf6254e4b2666ef169
|
eace45873190a27302b3644c32ec82854b59d299 |
|
25-Nov-2014 |
Mathieu Chartier <mathieuc@google.com> |
Move dexCacheStrings from ArtMethod to Class Adds one load for const strings which are not direct. Saves >= 60KB of memory avg per app. Image size: -350KB. Bug: 17643507 Change-Id: I2d1a3253d9de09682be9bc6b420a29513d592cc8 (cherry picked from commit f521f423b66e952f746885dd9f6cf8ef2788955d)
|
f521f423b66e952f746885dd9f6cf8ef2788955d |
|
25-Nov-2014 |
Mathieu Chartier <mathieuc@google.com> |
Move dex cache strings from ArtMethod -> Class Adds one load for const strings which are not direct. Saves >= 60KB of memory avg per app. Image size: -350KB. Bug: 17643507 Change-Id: I2d1a3253d9de09682be9bc6b420a29513d592cc8
|
2d7210188805292e463be4bcf7a133b654d7e0ea |
|
10-Nov-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change 64 bit ArtMethod fields to be pointer sized Changed the 64 bit entrypoint and gc map fields in ArtMethod to be pointer sized. This saves a large amount of memory on 32 bit systems. Reduces ArtMethod size by 16 bytes on 32 bit. Total number of ArtMethod on low memory mako: 169957 Image size: 49203 methods -> 787248 image size reduction. Zygote space size: 1070 methods -> 17120 size reduction. App methods: ~120k -> 2 MB savings. Savings per app on low memory mako: 125K+ per app (less active apps -> more image methods per app). Savings depend on how often the shared methods are on dirty pages vs shared. TODO in another CL, delete gc map field from ArtMethod since we should be able to get it from the Oat method header. Bug: 17643507 Change-Id: Ie9508f05907a9f693882d4d32a564460bf273ee8 (cherry picked from commit e832e64a7e82d7f72aedbd7d798fb929d458ee8f)
|
e832e64a7e82d7f72aedbd7d798fb929d458ee8f |
|
10-Nov-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change 64 bit ArtMethod fields to be pointer sized Changed the 64 bit entrypoint and gc map fields in ArtMethod to be pointer sized. This saves a large amount of memory on 32 bit systems. Reduces ArtMethod size by 16 bytes on 32 bit. Total number of ArtMethod on low memory mako: 169957 Image size: 49203 methods -> 787248 image size reduction. Zygote space size: 1070 methods -> 17120 size reduction. App methods: ~120k -> 2 MB savings. Savings per app on low memory mako: 125K+ per app (less active apps -> more image methods per app). Savings depend on how often the shared methods are on dirty pages vs shared. TODO in another CL, delete gc map field from ArtMethod since we should be able to get it from the Oat method header. Bug: 17643507 Change-Id: Ie9508f05907a9f693882d4d32a564460bf273ee8
|
76649e8d775519fe19f2b14d18ac488c13296054 |
|
10-Nov-2014 |
Vladimir Marko <vmarko@google.com> |
Keep original order of fields in Class. The fields of a class are ordered alphabetically in the dex file. Keep the same order in the field arrays so that we can do binary search lookups by name. Those lookups will be implemented in a subsequent change in libcore/. Bug: 18211592 (cherry picked from commit bfa3ed0ad988e1da13626ddbaf6dcae0c58ea79e) Change-Id: I8f979de62ffe37d1c7d5c721717d2f3501e7c9e6
|
bfa3ed0ad988e1da13626ddbaf6dcae0c58ea79e |
|
10-Nov-2014 |
Vladimir Marko <vmarko@google.com> |
Keep original order of fields in Class. The fields of a class are ordered alphabetically in the dex file. Keep the same order in the field arrays so that we can do binary search lookups by name. Those lookups will be implemented in a subsequent change in libcore/. Bug: 18211592 Change-Id: I8f979de62ffe37d1c7d5c721717d2f3501e7c9e6
|
5f9a95423dda3a2f945c81a04107fedf18e2c2c1 |
|
08-Nov-2014 |
Mathieu Chartier <mathieuc@google.com> |
Delete unused imtable field Bug: 17643507 Change-Id: I1fc7ca2d3bdf1810bcc3b46f867b68a4a6d28ed3 (cherry picked from commit f2d556401ec1d82fec31c0b29d712de18d838282
|
f2d556401ec1d82fec31c0b29d712de18d838282 |
|
08-Nov-2014 |
Mathieu Chartier <mathieuc@google.com> |
Delete unused imtable field Bug: 17643507 Change-Id: I1fc7ca2d3bdf1810bcc3b46f867b68a4a6d28ed3
|
575e78c41ece0dec969d31f46be563d4eb7ae43b |
|
04-Nov-2014 |
Andreas Gampe <agampe@google.com> |
ART: Replace COMPILE_ASSERT with static_assert (runtime) Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
|
6a3c1fcb4ba42ad4d5d142c17a3712a6ddd3866f |
|
31-Oct-2014 |
Ian Rogers <irogers@google.com> |
Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags. 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
|
473484fac7bd53523f5503176ecc5955325a9731 |
|
28-Oct-2014 |
Ian Rogers <irogers@google.com> |
Tidy MethodProtoHelper. Move to place of only use, class_linker.cc. Be lazy in computing the name. Before: WaitTime: 2699 WaitTime: 2791 WaitTime: 2653 WaitTime: 2929 WaitTime: 2651 WaitTime: 2971 After: WaitTime: 2749 WaitTime: 2786 WaitTime: 2852 WaitTime: 2856 WaitTime: 2703 WaitTime: 2784 Bug: 18054905 Bug: 16828525 (cherry picked from commit 03b6eafba8ace9a9c4d5ee9c47723d1910ccd7a8) Change-Id: I1438efbda58369ddd0ac36eda8a5a0a6c6fdff77
|
03b6eafba8ace9a9c4d5ee9c47723d1910ccd7a8 |
|
28-Oct-2014 |
Ian Rogers <irogers@google.com> |
Tidy MethodProtoHelper. Move to place of only use, class_linker.cc. Be lazy in computing the name. Change-Id: I1438efbda58369ddd0ac36eda8a5a0a6c6fdff77
|
2d2621a1463d2f3f03fa73503fa42e43657cdcfc |
|
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 (cherry picked from commit 1fb463e42cf1d67595cff66d19c0f99e3046f4c4) Change-Id: I27cc70178fd3655fbe5a3178887fcba189d21321
|
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
|
f4c15a18eb055735857a280856be5b142e0c1113 |
|
21-Oct-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Fix a DCHECK failure IsResolved() || IsErroneous(). Bug: 17914035 Change-Id: I90877d31fdce3d3bf7b5f22f7759f9536ab14d03
|
f6b0d41a652dcbcb73c61ee866e5efdd7bd516c0 |
|
17-Oct-2014 |
Brian Carlstrom <bdc@google.com> |
Tracking change to make Class.getDeclaredFields/Methods public (cherry picked from commit d8bef73723ea2d101b36e857968bc15d0887dcee) Bug: 17375269 (cherry picked from commit b144fce20290535fd362df8e79106c9c35ae9efb) Change-Id: I2672311ed972cd15b204b25a22a4de179fe7bcb6
|
b144fce20290535fd362df8e79106c9c35ae9efb |
|
17-Oct-2014 |
Brian Carlstrom <bdc@google.com> |
Tracking change to make Class.getDeclaredFields/Methods public (cherry picked from commit d8bef73723ea2d101b36e857968bc15d0887dcee) Bug: 17375269 Change-Id: I8a810b4f21eb5a94883415cf7ecc4df273d72688
|
d8bef73723ea2d101b36e857968bc15d0887dcee |
|
17-Oct-2014 |
Brian Carlstrom <bdc@google.com> |
Tracking change to make Class.getDeclaredFields/Methods public Bug: 17375269 Change-Id: Ib3bc256e2034258210e153ff664ee9b1f2d806f7
|
cdc1aaffabbdf417d29b203b2cd2763ed2d623f8 |
|
09-Oct-2014 |
Ian Rogers <irogers@google.com> |
Simplify instance reference offsets. Don't encode Object's class. Use trailing rather than leading zeroes to give offset position. Change-Id: I1ae74e7a01f63696429644adf81cdf6ee58832fe
|
f0edfc355893d53d1104b05501c99ad5ccf305c4 |
|
25-Sep-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Some optimizations for the array alloc path. - Force Array::Alloc() to be inlined. - Simplify the array size overflow check. - Turn fill_usable into a template parameter. - Remove a branch in Array::DataOffset() and avoid Primitive::ComponentSize(), which has a switch, in the array alloc path. - Strength reductions in the array size computation by using component size shifts instead of component sizes. Store component size shift in the upper 16 bits of primitive_type field. - Speedup: ~4% (3435->3284) in MemAllocTest on N4. Bug: 9986565 Change-Id: I4b142ffac4ab8b5b915836f1660a949d6442344c
|
5a4b8a236030460651a3136397d23ca6744e7eb7 |
|
11-Sep-2014 |
Andreas Gampe <agampe@google.com> |
ART: Rename Handle hierarchy Bring the names in line with normal OO principles: ConstHandle becomes Handle, and Handle becomes MutableHandle. Change-Id: I0f018eb7ba28bc422e3a23dd73a6cbe6fc2d2044
|
7b078e8c04f3e1451dbdd18543c8b9692b5b067e |
|
10-Sep-2014 |
Ian Rogers <irogers@google.com> |
Compile time performance improvements focusing on interpret-only. Reduce virtual method dispatch in the method verifier and make more code inline-able. Add a StringPiece with const char* equality operator to avoid redundant StringPieces and strlens. Remove back link from register line to verifier and pass as argument to reduce size of RegisterLine. Remove instruction length from instruction flags and compute from the instruction, again to reduce size. Add suspend checks to resolve and verify to allow for more easy monitor inflation and reduce contention on Locks::thread_list_suspend_thread_lock_. Change ThrowEarlierClassFailure to throw pre-allocated exception. Avoid calls to Thread::Current() by passing self. Template specialize IsValidClassName. Make ANR reporting with SIGQUIT run using checkpoints rather than suspending all threads. This makes the stack/lock analysis less lock error prone. Extra Barrier assertions and condition variable time out is now returned as a boolean both from Barrier and ConditionVariable::Wait. 2 threaded host x86-64 interpret-only numbers from 341 samples: Before change: Avg 176.137ms 99% CI 3.468ms to 1060.770ms After change: Avg 139.163% 99% CI 3.027ms to 838.257ms Reduction in average compile time after change is 20.9%. Slow-down without change is 26.5%. Bug: 17471626 - Fix bug where RegTypeCache::JavaLangObject/String/Class/Throwable could return unresolved type when class loading is disabled. Bug: 17398101 Change-Id: Id59ce3cc520701c6ecf612f7152498107bc40684
|
f397866ce6d446d3ec5d12a6d002a3ee2d34b9c7 |
|
11-Sep-2014 |
Brian Carlstrom <bdc@google.com> |
Fix cpplint issue. Change-Id: I57f70381b005a3601bba1ab4d646e974860af1c4
|
48498591b90a8ff7b24b1ce05c220e3bc42013df |
|
11-Sep-2014 |
Andreas Gampe <agampe@google.com> |
ART: Correctly make methods preverified Bug: 16828525 (cherry picked from commit df1532b9ba0cda2d00b78fbdef461f8a6cf8a737) Change-Id: I66756348b2aa50e41dacca59769b6810a91c73b0
|
df1532b9ba0cda2d00b78fbdef461f8a6cf8a737 |
|
11-Sep-2014 |
Andreas Gampe <agampe@google.com> |
ART: Correctly make methods preverified Bug: 16828525 Change-Id: I66756348b2aa50e41dacca59769b6810a91c73b0
|
46f0e97fcd4521db8b98a62eb977095b884659db |
|
11-Sep-2014 |
Mingyao Yang <mingyao@google.com> |
Add some comments for retired class. Change-Id: I9208ddc9a73ce751d5bfba786cf0496faba8e126
|
faff0f05fef90577c9744505555675185832aacd |
|
10-Sep-2014 |
Mingyao Yang <mingyao@google.com> |
Remove reference_static_offsets used for iterating through class static fields. Since static fields are contiguous in class object and there is no need to traverse super classes, it's not meaningful to use reference_static_offsets. Also especially with embedded vtable/imt, static field offset can't be encoded with an unsigned integer anyway. A corresponding change is made to Class.java to remove the member field. Bug: 16236588 Change-Id: I1fde3cd9efce884945876f0658c63d992164fd94
|
37f05ef45e0393de812d51261dc293240c17294d |
|
17-Jul-2014 |
Fred Shih <ffred@google.com> |
Reduced memory usage of primitive fields smaller than 4-bytes Reduced memory used by byte and boolean fields from 4 bytes down to a single byte and shorts and chars down to two bytes. Fields are now arranged as Reference followed by decreasing component sizes, with fields shuffled forward as needed. Bug: 8135266 Change-Id: I65eaf31ed27e5bd5ba0c7d4606454b720b074752
|
bf99f77dda749e2b653e8c45259b1fb56e7bb012 |
|
24-Aug-2014 |
Mathieu Chartier <mathieuc@google.com> |
Clean up Handle usage. Prefer using ConstHandle instead of Handle as function arguments since you can't assign new references to ConstHandle which helps prevent bugs. Changed NullHandle to be a ConstHandle so that you can never modify it to be a non null reference. Change-Id: I81cb979f6f8d5b49e5614966a2caf28c3701dd4f
|
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
|
1ff3c98775a4577cf053dba9a0c2d5c21c07b298 |
|
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
|
81db6a7c20aa008c7edbb7377b4bc3a9afe91bb7 |
|
09-Aug-2014 |
Andreas Gampe <agampe@google.com> |
ART: Do not check interface being subclass for member access When checking access to a protected member, do not try to see whether an interface is a subclass of the declaring class. Bug: 16904661 Change-Id: I3e1fa4ce9753e0a96633fff0fba807d72bc0b19d
|
13f8a168d484d747e07154a9357bd72d5b04c379 |
|
09-Aug-2014 |
Andreas Gampe <agampe@google.com> |
ART: Do not check interface being subclass for member access When checking access to a protected member, do not try to see whether an interface is a subclass of the declaring class. Bug: 16904661 (cherry picked from commit 81db6a7c20aa008c7edbb7377b4bc3a9afe91bb7) Change-Id: I3e1fa4ce9753e0a96633fff0fba807d72bc0b19d
|
68d8b42ddec39ec0174162d90d4abaa004d1983e |
|
17-Jul-2014 |
Ian Rogers <irogers@google.com> |
Wire up check JNI force copy mode. 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
|
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
|
d85614222fa062ec809af9d65f04ab6b7dc1c248 |
|
11-Jul-2014 |
Fred Shih <ffred@google.com> |
Revert "Revert "Revert "Revert "Add intrinsic for Reference.get()"""" Fixed TargetReg issue causing build failure for x86. This reverts commit 9e82bd3f0ce9e5f5777bea2f752ff3e251d32f9f. (cherry picked from commit 4ee7a665e7f9cd2c5ace2d6304e33f64067b209f) Change-Id: I555f4e06955711262e6b37ffbeabee9698ec695c
|
4ee7a665e7f9cd2c5ace2d6304e33f64067b209f |
|
11-Jul-2014 |
Fred Shih <ffred@google.com> |
Revert "Revert "Revert "Revert "Add intrinsic for Reference.get()"""" Fixed TargetReg issue causing build failure for x86. This reverts commit 9e82bd3f0ce9e5f5777bea2f752ff3e251d32f9f. Change-Id: I7e6a526954467aaf68deeed999880dfe9aa5f06e
|
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
|
4e99b3d8955131f3fc71aa113f0fa71f0092cb6f |
|
24-Jun-2014 |
Sebastien Hertz <shertz@google.com> |
Add missing class initialization during compilation and tests Adds missing class initialization during compilation and tests, especially java.lang.Class. Otherwise, we'd be able to execute code while the referring class is not initialized or initializing. Also adds mirror::Class::AssertInitializedOrInitializingInThread method to check class initialization when entering the interpreter: the called method's declaring class must either be initialized or be initializing by the current thread (other threads must be waiting for the class initialization to complete holding its lock). Note we only do this check in debug build. Bump oat version to force compilation. Bug: 15899971 Change-Id: I9a4edd3739a3ca4cf1c4929dcbb44cdf7a1ca1fe
|
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
|
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
|
bd0fb61e24270b1f382ecbef4c1260c703550e84 |
|
20-May-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Simplify Class::IsArtFieldClass(). Fix the slight glitch that when ImageSpace::VerifyImageAllocations() called in ImageSpace::Create(), the ArtField and ArtMethod class roots weren't set, which were used by DCHECKs in Object::Size(), which VerifyImageAllocations() calls, by delaying the point of the VerifyImageAllocations() call to Runtime::Init() at which point the class linker has set the class roots. To completely disable read barriers from Object::SizeOf(), the ReadBarrierOption template parameter should have been added to Class::GetInstanceField(), which calls GetFieldObject(), when it's called from Class::IsArtFieldClass(). This change fixes this by removing the need for the call, instead of adding the ReadBarrierOption parameter. Bug: 12687968 Change-Id: Ibbecc08f4e3b898851805d690dff8ccac55e94f2
|
700a402244a1a423da4f3ba8032459f4b65fa18f |
|
20-May-2014 |
Ian Rogers <irogers@google.com> |
Now we have a proper C++ library, use std::unique_ptr. Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
|
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
|
6e83c172f385cb45dd13bbcf41d2df8e410828c6 |
|
02-May-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Replace the bool kDoReadBarrier template parameter with an enum. Fix one kDoReadBarrier/kIsVolatile mixup in an Object::GetFieldObject call. Bug: 12687968 Change-Id: I896b1137b21a20c0504abd2bf3fe6f83805f3300
|
8668c3cbdcf9471bd97e0da68a240051f2973074 |
|
25-Apr-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add finalizer references from the entrypoints. 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
|
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
|
ee1d79a603c77c0667b27c075a983579d5c51f7e |
|
21-Feb-2014 |
Sebastien Hertz <shertz@google.com> |
Cleanup transaction support Updates Thread::CreateInternalStackTrace to support both transactional and non-transactional modes using template. Generalizes non-transactional mode for invariant fields (which are set only once). Removes ArrayLog::VisitRoots as we never create Array logs of ObjectArray. As ObjectArray elements are set using Object::SetFieldObject, they are already recorded in the object logs: the object is the array itself and the offset corresponds to the element index in this array. And also checks we never log ObjectArray in array logs. Fixes location of thrown exception when calling native method during class initialization. Change-Id: Idbc368d3b8292b85ff40bc8a7c559e085477bf89
|
407f702da4f867c074fc3c8c688b8f8c32279eff |
|
18-Feb-2014 |
Mathieu Chartier <mathieuc@google.com> |
Refactor object reference visiting logic. Refactored the reference visiting logic to be in mirror::Object instead of MarkSweep. Change-Id: I773249478dc463d83b465e85c2402320488577c0
|
c645f1ddb7c40bea6a38eda4b3f83f6b6dec405b |
|
07-Mar-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add more VerifyObject calls. 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
|
c2f4d0240b3a9b905dff5b546924865f15241481 |
|
04-Mar-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix SafePrettyTypeOf to never call VerifyObject. Calling VerifyObject from the segfault handler caused another segfault. Change-Id: I459646594d830cbb110a4ac2bac25a7b90794854
|
4e30541a92381fb280cd0be9a1763b713ee4d64c |
|
19-Feb-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix and optimize verify object. VerifyObject no longer resides in heap. You can now enable VerifyObject for non-debug builds. VerifyStack is still slow, so it is now guarded by its own flag. Fixed the image writer to not use verification at places where verification fails due to invalid reads. Fixed RosAlloc to use SizeOf which doesn't call verify object. Added a flag paremeter to some of the mirror getters / setters to be able to selectively disable VerifyObject on certain calls. Optimized the GC to not verify each object multiple times during object scanning if verify object is enabled. Added 3 verification options: verify reads, verify this, and verify writes so that you can select how much verification you want for mirror getters and setters. Removed some useless DCHECKs which would slow debug builds without providing any benefits. TODO: RosAlloc verification doesn't currently work with verify objects. Bug: 12934910 Bug: 12879358 Change-Id: Ic61033104dfc334543f89b0fc0ad8cd4f4015d69
|
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
|
64cffee929a1782622015fd18beebc86d0afb1da |
|
04-Feb-2014 |
Vladimir Marko <vmarko@google.com> |
Make DexCache references const. Clean up after https://android-review.googlesource.com/80446 . Change-Id: I32dac9d8aa68bb891ec8b551d771f65db7be409d
|
89786437f4c0176b35ca0376153dd18ab7df4924 |
|
31-Jan-2014 |
Vladimir Marko <vmarko@google.com> |
Don't assume resolved type has the same dex cache. When we resolve a type with a certain DexCache that type's GetDexCache() doesn't necessarily return the same DexCache. This could have led to the wrong DexFile being used in access checks by the CompilerDriver. Change-Id: I2c836477f69f142bcbff902207dc0ad83854a398
|
23a282146042a0d171aec2a415176f5d0621a90c |
|
09-Jan-2014 |
Vladimir Marko <vmarko@google.com> |
Clean up access checks. Change-Id: Ia62ba6c8f1d0a9bfbbfde2d7be4c52c0f982b9d2
|
5ddb4104ac605d66693b55b79f26f8b8a5505e63 |
|
07-Jan-2014 |
Ian Rogers <irogers@google.com> |
Remove intialized static storage from dex cache. The initialized static storage array is used by compiled code to determine if for a sget/sput class initialization is necessary. The compiled code typically doesn't require this test as the class is pre-initialized or the class being accessed is the same as the current method. Change-Id: Icbc45e692b3d0ac61e559e69edb6c9b29439e571
|
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
|
cbb2d20bea2861f244da2e2318d8c088300a3710 |
|
15-Nov-2013 |
Mathieu Chartier <mathieuc@google.com> |
Refactor allocation entrypoints. Adds support for switching entrypoints during runtime. Enables addition of new allocators with out requiring significant copy paste. Slight speedup on ritzperf probably due to more inlining. TODO: Ensuring that the entire allocation path is inlined so that the switch statement in the allocation code is optimized out. Rosalloc measurements: 4583 4453 4439 4434 4751 After change: 4184 4287 4131 4335 4097 Change-Id: I1352a3cbcdf6dae93921582726324d91312df5c9
|
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
|
88474b416eb257078e590bf9bc7957cee604a186 |
|
24-Oct-2013 |
Jeff Hao <jeffhao@google.com> |
Implement Interface Method Tables (IMT). Change-Id: Idf7fe85e1293453a8ad862ff2380dcd5db4e3a39
|
ba150c37d582eeeb8c11ba5245edc281cf31793c |
|
28-Aug-2013 |
Brian Carlstrom <bdc@google.com> |
Omit OatMethodOffsets for classes without compiled code Change-Id: If0d290f4aebc778ff12d8fed017c270ad2ac3220
|
a9a8254c920ce8e22210abfc16c9842ce0aea28f |
|
04-Oct-2013 |
Ian Rogers <irogers@google.com> |
Improve quick codegen for aput-object. 1) don't type check known null. 2) if we know types in verify don't check at runtime. 3) if we're runtime checking then move all the code out-of-line. Also, don't set up a callee-save frame for check-cast, do an instance-of test then throw an exception if that fails. Tidy quick entry point of Ldivmod to Lmod which it is on x86 and mips. Fix monitor-enter/exit NPE for MIPS. Fix benign bug in mirror::Class::CannotBeAssignedFromOtherTypes, a byte[] cannot be assigned to from other types. Change-Id: I9cb3859ec70cca71ed79331ec8df5bec969d6745
|
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
|
3b4c18933c24b8a33f38573c2ebcdb9aa16efeb5 |
|
13-Sep-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
Split the allocation path into 'instrumented' and 'uninstrumented' ones. The instrumented path is equivalent to the existing allocation path that checks for three instrumentation mechanisms (the debugger allocation tracking, the runtime allocation stats collection, and valgrind) for every allocation. The uinstrumented path does not perform these checks. We use the uninstrumented path by default and enable the instrumented path only when any of the three mechanisms is enabled. The uninstrumented version of Heap::AllocObject() is inlined. This change improves the Ritz MemAllocTest by ~4% on Nexus 4 and ~3% on Host/x86. Bug: 9986565 Change-Id: I3e68dfff6789d77bbdcea98457b694e1b5fcef5f
|
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
|
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
|
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
|
fb6996fe2b1bb28526751650441d7ac29dcdb4e6 |
|
19-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Fixing cpplint runtime/arrays, runtime/int, runtime/virtual issues Change-Id: Ia2ff94d2fb69465df26aaf83df82614a483b26e0
|
fc0e3219edc9a5bf81b166e82fd5db2796eb6a0d |
|
17-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Fix multiple inclusion guards to match new pathnames Change-Id: Id7735be1d75bc315733b1773fba45c1deb8ace43
|
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
|