summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Remove dexmaker code from dx."Jesse Wilson2012-01-0517-4683/+0
|\
| * Remove dexmaker code from dx.Jesse Wilson2012-01-0417-4683/+0
| | | | | | | | | | | | | | This now lives as a standalone project: http://code.google.com/p/dexmaker/ Change-Id: I4f7abff9399d6827082c9af78a015562fdbcdbb3
* | Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-0363-355/+355
|/ | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: Ic663376d1ad6a6cb14bf81405ad9afd247cf2f60
* Introduces ProxyBuilder and tests.Hugo Hudson2011-12-214-1/+1234
| | | | | | | | | | | | | - ProxyBuilder is to concrete classes what java.lang.reflect.Proxy is to interfaces. - Uses a builder pattern to make specifying of the various (optional) parameters easier. - Creates a concrete subclass of the supplied input class whose implementation delegates to the given invocation handler. - Also provides a fix for the Code#loadConstant method to allow loading null values. Change-Id: I3ca6a98b91c64466df03120bc85f095365250aca
* Merge "DexGenerator: allow specifying dex cache dir."Hugo Hudson2011-12-163-12/+49
|\
| * DexGenerator: allow specifying dex cache dir.Hugo Hudson2011-12-163-12/+49
| | | | | | | | | | | | | | | | | | | | | | - Switches DexGenerator to not use extended opcodes. This allows us to write suitable files for earlier versions of Android. - Allows caller to specify optimised dex directory. This allows us to get around /data/dalvik-cache not being world-writeable. - Allows caller to specify optimised dex files cache dir. This allows us to skip the requirement of being able to write to /sdcard. Change-Id: I2cae2e187ccf5b20b98763cb7eb791383a7d5a59
* | DexOptions should default targetApiLevel to API_NO_EXTENDED_OPCODESBrian Carlstrom2011-12-131-1/+1
| | | | | | | | | | | | | | | | Bug: 5738782 (cherry picked from commit b14b69728337cf5808eed4d5652fb9d5be33dff0) Change-Id: I51991c85c74b41fa51556b369a3724ba9dd0c090
* | Merge "Don't throw an AssertionError on invalid input."Jesse Wilson2011-12-131-2/+1
|\ \
| * | Don't throw an AssertionError on invalid input.Jesse Wilson2011-12-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Throwing an AssertionError prevents tools like FindUsages from recovering. Bug: http://b/5470168 Change-Id: I6ae99bd29e25f868a739548266cedf85d0b26e90
* | | Merge "Remove dx's copy of JUnit."Jesse Wilson2011-12-1242-2618/+21
|\ \ \
| * | | Remove dx's copy of JUnit.Jesse Wilson2011-12-0942-2618/+21
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, use JUnit the same way other code uses JUnit: by depending on the copy in external. There is no longer a top-level option in dx to run JUnit tests on itself. There are two failing tests in dx/junit-tests. Both of these are in the recently created DexGeneratorTest; I intend to fix these in another change. Bug: http://b/2286423 Change-Id: I3a173a0302c7ccc81be3b5a2a4d766000d1c242b
* | | am 2ca72c70: Reconcile with ics-mr1-releaseThe Android Open Source Project2011-12-090-0/+0
|\ \ \ | |/ / |/| | | | | * commit '2ca72c704e7462c56f8c4489369b618872b595a0':
| * | Reconcile with ics-mr1-releaseThe Android Open Source Project2011-12-080-0/+0
| |\ \ | | | | | | | | | | | | Change-Id: I61fc74707db482c4600aaa34b751a665c75ffcec
* | | | Admit to not supporting over 65,536 methods.Jesse Wilson2011-12-0910-1019/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was previously a work in progress, but that work wasn't completed and the test shouldn't assume the work is complete. Bug: http://code.google.com/p/android/issues/detail?id=22545 Change-Id: I44a9532d96ab548283278ca3218773ea449f8318
* | | | Reconcile with ics-mr1-releaseThe Android Open Source Project2011-12-020-0/+0
|\ \ \ \ | | |/ / | |/| | | | | | Change-Id: I63967a8c63fb1d2f5af167b3a23c848829b01938
| * | | merge in ics-mr1-release history after reset to ics-mr1The Android Automerger2011-12-010-0/+0
| |\ \ \ | | |/ / | |/| |
* | | | am a18e6d13: Initialize the vC field of inlined getters/setters.Ben Cheng2011-12-011-0/+14
|\| | | | | | | | | | | | | | | | | | | * commit 'a18e6d135a869f9c62f9ec8bac8b9e78d92c697f': Initialize the vC field of inlined getters/setters.
| * | | Initialize the vC field of inlined getters/setters.Ben Cheng2011-12-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | To eliminate a benign Valgrind warning. Change-Id: I5f0ae53b8c86fe476f0b7ddfb6589191aea464f6
* | | | am ee155d4f: Initialize the JNI indirect ref table to make Valgrind happy.Ben Cheng2011-12-011-2/+3
|\| | | | |_|/ |/| | | | | | | | * commit 'ee155d4fe47fa751262beb43437a339fde8eabe5': Initialize the JNI indirect ref table to make Valgrind happy.
| * | Initialize the JNI indirect ref table to make Valgrind happy.Ben Cheng2011-11-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Specifically, this is to eliminate the benign warning about the 'serial' field being uninitialized. BUG: 5542417 Change-Id: I8550972e70db94f24c47c4e5dea0b59cc5840b48
* | | Use libcorkscrew to format the stack trace.Jeff Brown2011-11-211-10/+4
| | | | | | | | | | | | Change-Id: I06ddbb7a8035971b6e1a164adcd00208fae89b1a
* | | Fix DexMerger to emit dex files without extended op codes.Jesse Wilson2011-11-181-2/+2
| | | | | | | | | | | | | | | | | | Certain tools in our tool chain don't like these. Change-Id: Iaaff85c1b634f647d0105c36f403b2e03aaf0ca7
* | | Be humane when there are more methods or fields than Dalvik can handle.Jesse Wilson2011-11-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously our errors would look like this: trouble writing output: opcode == null Or this: trouble writing output: No expanded opcode for 7f9c1af3 Now our errors look like this: trouble writing output: Too many methods: 86922; max is 65536 Bug: http://code.google.com/p/android/issues/detail?id=20814 Change-Id: I2d9dc55e188a6ac1661b74af2194b18019859a29
* | | Can't set variable to null with loadConstant.Hugo Hudson2011-11-171-0/+21
| | | | | | | | | | | | Change-Id: I9349507b8af2b59e03f7542b7589f2dbcdb77711
* | | This test fails with a class not found error.Hugo Hudson2011-11-171-0/+17
| | | | | | | | | | | | Change-Id: I7a98cbc30d32a0f19fa3892b58775ba10536c6aa
* | | Reconcile with ics-mr1-releaseThe Android Open Source Project2011-11-100-0/+0
|\ \ \ | | |/ | |/| | | | Change-Id: I63807d2f883382fa765e5eefe7fd17ac3cbcbe67
| * | merge in ics-mr1-release history after reset to ics-mr1The Android Automerger2011-11-100-0/+0
| |\ \ | | |/ | |/|
* | | am cab0fdf8: (-s ours) DO NOT MERGE Further refinement of card table clearAndy McFadden2011-11-100-0/+0
|\| | | | | | | | | | | | | | * commit 'cab0fdf82a668e2a1a054cd6506835046218e419': DO NOT MERGE Further refinement of card table clear
| * | DO NOT MERGE Further refinement of card table clearAndy McFadden2011-11-091-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're currently using memset() to clear cards out to the growth limit, which on a device configured for 48MB/128MB process caps means we're sitting on 384KB or 1MB of pages. We can reduce that substantially. This change attempts to reduce the memset() length to the currently active portion of the card table, based on the placement of objects in the "live objects" bitmap. This should avoid faulting in card pages that we don't actually need. This is suboptimal when parts of the card table are used briefly and then ignored for a while. An alternative implementation, which uses madvise(DONTNEED) aggressively, is also included (#ifdefed out). Bug 5567332 (cherry-pick from master) Change-Id: I6b181de20a0c8b6307acaebbc5d6dac20422f25d
* | | Further refinement of card table clearAndy McFadden2011-11-091-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're currently using memset() to clear cards out to the growth limit, which on a device configured for 48MB/128MB process caps means we're sitting on 384KB or 1MB of pages. We can reduce that substantially. This change attempts to reduce the memset() length to the currently active portion of the card table, based on the placement of objects in the "live objects" bitmap. This should avoid faulting in card pages that we don't actually need. This is suboptimal when parts of the card table are used briefly and then ignored for a while. An alternative implementation, which uses madvise(DONTNEED) aggressively, is also included (#ifdefed out). Bug 5567332 Change-Id: I7663ae7d15d0aaa8158deed5e331bf05333da6bb
* | | Merge "Fix reporting of initial pause time"Andy McFadden2011-11-081-1/+1
|\ \ \
| * | | Fix reporting of initial pause timeAndy McFadden2011-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "rootEnd" time was being captured before dvmClearCardTable() was called. Bug 5567332 Change-Id: I5499f1648c3e41296c18fa5d95d834c2d2853e8f
* | | | Reconcile with ics-mr1-releaseThe Android Open Source Project2011-11-070-0/+0
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| Change-Id: I91ffc584e0d2d39aaec9b28ac3cde8b625234968
| * | merge in ics-mr1-release history after reset to ics-mr1The Android Automerger2011-11-060-0/+0
| |\ \ | | |/ | |/|
* | | am 6cd72bd0: Merge "Don\'t pay for filename/line number lookup unless you ↵Elliott Hughes2011-11-051-32/+33
|\| | | | | | | | | | | | | | | | | | | | need to." into ics-mr1 * commit '6cd72bd0161459e21d496b927967bd0ca6fe0f94': Don't pay for filename/line number lookup unless you need to.
| * | Merge "Don't pay for filename/line number lookup unless you need to." into ↵Elliott Hughes2011-11-041-32/+33
| |\ \ | | | | | | | | | | | | ics-mr1
| | * | Don't pay for filename/line number lookup unless you need to.Elliott Hughes2011-11-031-32/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This wasn't a regression; the code's always been like this. But this shows up in profiles of anything doing a lot of synchronized stuff, even when there's no contention. There are two awkward cases. One is that the old code used to offer a variety of special-case messages for failures to find the current frame, save area, and Method*. I assume this was just to help in debugging and shouldn't happen in practice, so I don't think we've lost anything there. The other case was that on unlocking, we used to explicitly say "unlocked". But I'm not sure we could get into a situation where we'd be reporting contention on a monitor that wasn't locked when we tried to lock it. So I think that's okay too. Change-Id: Ib4401c771f717e9c8cc9c4e5346ec7a5f46a1636
* | | | am 50e01501: Merge "Knock ::self() out of the ParseXml profile." into ics-mr1Elliott Hughes2011-11-054-271/+204
|\| | | | | | | | | | | | | | | | | | | * commit '50e015017f091118f0147d02d23140ff9f88daec': Knock ::self() out of the ParseXml profile.
| * | | Merge "Knock ::self() out of the ParseXml profile." into ics-mr1Elliott Hughes2011-11-044-271/+204
| |\ \ \
| | * | | Knock ::self() out of the ParseXml profile.Elliott Hughes2011-11-034-271/+204
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New profile (>=0.6, which is where the original seems to have cut off): 47 11.0070 dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*) 30 7.0258 dvmChangeStatus(Thread*, ThreadStatus) 29 6.7916 addLocalReference(Thread*, Object*) 26 6.0890 dexDecodeDebugInfo(DexFile const*, DexCode const*, char const*, unsigned int, unsigned int, int (*)(void*, unsigned int, unsigned int), void (*)(void*, unsigned short, unsigned int, unsigned int, char const*, char const*, char const*), void*) 22 5.1522 dalvik_inst 15 3.5129 lockMonitor(Thread*, Monitor*) 14 3.2787 dvmLineNumFromPC 13 3.0445 javaLangString_equals(unsigned int, unsigned int, unsigned int, unsigned int, JValue*) 13 3.0445 scanObject(Object const*, GcMarkContext*) 12 2.8103 ScopedJniThreadState::ScopedJniThreadState(_JNIEnv*) 12 2.8103 common_invokeMethodNoRange 12 2.8103 dvmDecodeIndirectRef(Thread*, _jobject*) 9 2.1077 IndirectRefTable::add(unsigned int, Object*) 9 2.1077 ReleasePrimitiveArrayCritical(_JNIEnv*, _jarray*, void*, int) 9 2.1077 markObjectNonNull(Object const*, GcMarkContext*, bool) 9 2.1077 unpinPrimitiveArray(ArrayObject*) 8 1.8735 getCodeAddrCommon(unsigned short const*, bool) 7 1.6393 dexStringByTypeIdx(DexFile const*, unsigned int) 7 1.6393 dvmHeapSourceAlloc(unsigned int) 6 1.4052 GetPrimitiveArrayCritical(_JNIEnv*, _jarray*, unsigned char*) 6 1.4052 dvmPlatformInvoke 6 1.4052 pinPrimitiveArray(ArrayObject*) 6 1.4052 readUnsignedLeb128(unsigned char const**) 6 1.4052 scanFields(Object const*, GcMarkContext*) 5 1.1710 IndirectRefTable::get(void*) const 5 1.1710 dvmFindInReferenceTable(ReferenceTable const*, Object**, Object*) 4 0.9368 common_returnFromMethod 4 0.9368 dvmAddToReferenceTable(ReferenceTable*, Object*) 4 0.9368 dvmHeapBitmapScanWalk(HeapBitmap*, void (*)(Object*, void*, void*), void*) 4 0.9368 dvmInterpret(Thread*, Method const*, JValue*) 4 0.9368 dvmLockObject 4 0.9368 dvmMalloc(unsigned int, int) 4 0.9368 findPackedSwitchIndex(unsigned short const*, int, int) 4 0.9368 readStringIdx(DexFile const*, unsigned char const**) 4 0.9368 unlockMonitor(Thread*, Monitor*) 3 0.7026 dvmSetFinalizable Change-Id: Ic5c36859f6810413bd0b48aad1d99da7daa6e8ba
* | | | am 4c83f214: Merge "Reduce Dalvik card table overhead" into ics-mr1Andy McFadden2011-11-055-4/+25
|\| | | | | | | | | | | | | | | | | | | * commit '4c83f214932af008cf79aee528ca3f9e66572040': Reduce Dalvik card table overhead
| * | | Merge "Reduce Dalvik card table overhead" into ics-mr1Andy McFadden2011-11-045-4/+25
| |\ \ \
| | * | | Reduce Dalvik card table overheadAndy McFadden2011-11-045-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VM has a "growth limit" (e.g. 48MB) that is used to cap normal apps, and a "max heap" (e.g. 128MB) that is used for apps with unusual high-memory requirements. The Dalvik GC uses a 128:1 "card table" that spans the entire managed heap, out to the "max heap" limit. The table is erased during every concurrent GC. The first time we do that post-zygote, the copy-on-write behavior causes physical pages to be allocated. We're currently clearing out to the heap max, not the growth limit, which means we have a bunch of physical memory allocated for pages that will never be used. This changes it so we only clear out to the growth limit. If the growth limit is removed by the app, we clear out to the heap max. On devices with a 128MB max heap, this reduces the private/dirty usage for most apps by 640KB. Bug 5567332 Change-Id: Iac633017c128d63b284d48016e47d40cc46df1de
* | | | | am ccf4c9d9: Don\'t decr profiling count without incrAndy McFadden2011-11-051-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit 'ccf4c9d99fcffbc9bf65066004896745b9dcc340': Don't decr profiling count without incr
| * | | | Don't decr profiling count without incrAndy McFadden2011-11-041-1/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The failure cleanup code in dvmMethodTraceStart() was assuming that profiling had already been started, which was true until my previous change. The code in the interpreter isn't too picky, but updateActiveProfilers() is trying to keep an accurate acount, and gets upset. If you pass in a bad filename, we disable something that was never enabled, and the VM gets confused and aborts out of spite. Related to bug 5564440 Change-Id: I17fd8bf4654c29f49efb10142d222a91c190b6ed
* | | | Merge "Slight change to unwinder API."Jeff Brown2011-11-041-1/+1
|\ \ \ \
| * | | | Slight change to unwinder API.Jeff Brown2011-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: If73f01fff9fb56ce9cba70a386d865957eaebe78
* | | | | Reconcile with ics-mr1-releaseThe Android Open Source Project2011-11-040-0/+0
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | Change-Id: Ibae283408ede0f3ff5a297e8d205e976455f3b95
| * | | | merge in ics-mr1-release history after reset to ics-mr1The Android Automerger2011-11-020-0/+0
| |\ \ \ \
* | \ \ \ \ am ab97cd16: Start profiling after state prepAndy McFadden2011-11-031-6/+8
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | * commit 'ab97cd1634ed4e2c9e5c558a9f88ed9ca8623c8c': Start profiling after state prep