summaryrefslogtreecommitdiffstats
path: root/dalvik
Commit message (Collapse)AuthorAgeFilesLines
...
* Adding binary hprof support to SamplingProfilerBrian Carlstrom2010-12-222-204/+1642
| | | | | | | | | | | | | | | | | | | | | SamplingProfiler refactored: - HprofData is now a separate class, the common data structure - SamplingProfiler uses HprofData as its runtime format - AsciiHprofWriter refactored from profiler, takes an HprofData - new BinaryHprofWriter to output HprofData in binary format - new BinaryHprofReader can recreate HprofData from binary file - new HprofBinaryToAscii command line tool to convert formats dalvik/src/main/java/dalvik/system/SamplingProfiler.java SamplingProfilerTest expanded to cover new HprofData class directly. Includes testing of conversion from various hand constructed HprofData to ascii and binary formats as well as from binary back to HprofData with out loss of data. dalvik/src/test/java/dalvik/system/SamplingProfilerTest.java Change-Id: I6fe06f5dbdbf2f0bf2de228d9761f84d75290ba7
* Revert "Remove inline natives for an unused performance test." (libcore)Jesse Wilson2010-12-223-1/+138
| | | | Change-Id: I7ea69f84c008c5bdbdf8af6134fb81d80f0a958e
* Remove native targets for unused performance tests.Jesse Wilson2010-12-223-138/+1
| | | | Change-Id: Ia61172cd52de031290a811c3ec73edb929f40c10
* Revert "Remove native targets for unused performance tests."Ben Cheng2010-12-212-1/+70
| | | | This reverts commit 272a383283a974a4c32a94469b8a8b021d93a480.
* Remove native targets for unused performance tests.Jesse Wilson2010-12-212-70/+1
| | | | | | See also change I5a252e31. Change-Id: I3880a81f1f7e90247ce12860b5a2f597037123a7
* Remove the external allocation facility.Carl Shapiro2010-12-171-29/+16
| | | | Change-Id: Ic21a01ff1f82f6b2d22d089711a2843b5a497eda
* We always wantDex at this point.Dan Bornstein2010-12-162-29/+26
| | | | | | | | | So, there was no longer a need to check for it. Cleaned up some comments and minor code convention violations while I was in the territory. Change-Id: I717fa74bad05cdbf02bd4f6d24108196579c451a
* Don't bother trying to unzip a file named "*.dex".Dan Bornstein2010-12-161-8/+17
| | | | | | | This avoids a bit of work that would inevitably fail. I also updated some comments to better reflect the status quo. Change-Id: I7435ec0abd4d0a8173d61c1f4b894bfafbc6f609
* Plumbing for loading byte[]-based dex files.Dan Bornstein2010-12-151-0/+6
| | | | | | | This is not yet complete. See related change I06af6df3 in the dalvik project. Change-Id: Iac4739c0e75bf95e1d5f019e946b8ddb256d3a26
* Add BlockGuardPolicyException constructor with a messageBrad Fitzpatrick2010-12-101-1/+8
| | | | Change-Id: Ied7ca5e1a1d7dbcf44d5bcf6834c04076461d605
* Fix a bunch of javac -Xlint warnings in our code.Elliott Hughes2010-12-082-25/+4
| | | | | | | | | I think "fallthrough" uncovered a couple of real bugs in the kxml code, but other than that there's nothing very exciting here. This addresses all but one of the non-xml warnings. I'm assuming that we'll move the xml cruft out into external at some point (since we're deliberately not maintaining it). Change-Id: Ice81253b019df7b19d6557e719663b7bdc11fb22
* Update and clarify opcode values.Dan Bornstein2010-12-032-219/+258
| | | | | | | | | | They're now represented as four hex digits, making it clear that they are raw opcode values (and not the packed representation). I also took this as the time to add the new opcodes and update Opcode.MAXIMUM_VALUE. Change-Id: If9e123b5d361ec6eed08c19886bdf2e20e12ab94
* Expose the "packed opcode" concept, just a bit.Dan Bornstein2010-12-021-8/+24
| | | | Change-Id: I8427290bd5179c6cd184227083bebe7dc0f33b44
* am 5aad086b: Merge "Fix SamplingProfiler to handle null group on thread ↵Brian Carlstrom2010-12-011-1/+3
|\ | | | | | | | | | | | | termination" * commit '5aad086b3800a9b328f9a4b6119f7d7532c752f7': Fix SamplingProfiler to handle null group on thread termination
| * Fix SamplingProfiler to handle null group on thread terminationBrian Carlstrom2010-12-011-1/+3
| | | | | | | | Change-Id: I7f888175fbe412b581d649c2e244ef26252a4482
* | Match comment to the new reality.Dan Bornstein2010-11-301-1/+2
|/ | | | | | ...which is the same as the slightly older reality, as it happens. Change-Id: If9f5a33a2a97471b25141cc1e7f496cdef5a77c4
* Merge "Add a wee bit of libdex access." into dalvik-devDan Bornstein2010-11-301-0/+12
|\
| * Add a wee bit of libdex access.Dan Bornstein2010-11-301-0/+12
| | | | | | | | | | | | | | This is going to be used in support of making the framework Debug class not have to include vm-specific constants. Change-Id: Ia017bbbb947d8e04192d462bb244cd085096e88d
* | Merge "Zero the cookie after close." into dalvik-devAndy McFadden2010-11-301-1/+2
|\ \ | |/ |/|
| * Zero the cookie after close.Andy McFadden2010-11-301-1/+2
| | | | | | | | | | | | | | | | | | The cookie values can be re-used by the VM, so zero it out after closing the DexFile to ensure we don't try to close again in the finalizer. Bug 3238298 Change-Id: I2cc6a0d90ae9fbdff9c6a0f34a8031f36aa78e70
* | Generate most libcore opcode-related stuff.Dan Bornstein2010-11-292-54/+114
|/ | | | | | | This brings libcore's Dalvik opcode definitions into the opcode-gen fold, but there is still a bit more to clean up after this. Change-Id: I199d6484f2d23f24a86ffe668739be99685a43e8
* A little opcode cleanup in dalvik.system.Dan Bornstein2010-11-292-22/+75
| | | | | | | OpcodeInfo is a sparse class right now, but I expect it will eventually start to look a bit like InstrInfo.[ch] in libdex. Change-Id: Ia446c95829515ee5f718ed80217d80a74738a09d
* am 4d7f6230: Merge "minor CloseGuard javadoc corrections"Brian Carlstrom2010-11-191-2/+2
|\ | | | | | | | | * commit '4d7f623096baf10fce592995cd959f28e56f4593': minor CloseGuard javadoc corrections
| * minor CloseGuard javadoc correctionsBrian Carlstrom2010-11-191-2/+2
| | | | | | | | Change-Id: I6892d1f03821032d40b2ea678b9406f464878755
* | am 4bfc26e9: CloseGuard: make members volatile, update commentBrad Fitzpatrick2010-11-151-3/+5
|\ \ | |/ | | | | | | * commit '4bfc26e99c8044a1d690003d4bb3d75348124f57': CloseGuard: make members volatile, update comment
| * CloseGuard: make members volatile, update commentBrad Fitzpatrick2010-11-151-3/+5
| | | | | | | | Change-Id: Id348a2d523fb92631a07684050b03311a6ea2eef
* | am f7ee2365: Fix javadoc typoBrian Carlstrom2010-11-081-1/+1
|\ \ | |/ | | | | | | * commit 'f7ee236589ca1fe73615c4dc8a536ffe29a236ff': Fix javadoc typo
| * Fix javadoc typoBrian Carlstrom2010-11-081-1/+1
| | | | | | | | Change-Id: I5e24358c62e00f199c71b9825b1b533b34510f74
* | am b81e1d9d: Add CloseGuard.Reporter interface to allow customization of ↵Brian Carlstrom2010-11-081-2/+42
|\ \ | |/ | | | | | | | | | | warnings * commit 'b81e1d9da6a4b039ffa55618fcccb013d3116261': Add CloseGuard.Reporter interface to allow customization of warnings
| * Add CloseGuard.Reporter interface to allow customization of warningsBrian Carlstrom2010-11-081-2/+42
| | | | | | | | | | | | | | This will be paired with a new implementation in StrictMode to allow more sophisticated reporting. Change-Id: I17668b5db333c4c9b7280ac0de5dc8d9ba1aab59
* | Merge "Export the assignable instance counting." into dalvik-devCarl Shapiro2010-11-041-2/+8
|\ \ | |/ |/|
| * Export the assignable instance counting.Carl Shapiro2010-11-041-2/+8
| | | | | | | | Change-Id: I4358afbf79ac8c33448b48f4b5e1d365371bca1b
* | Adding CloseGuard.setEnabled for StrictMode integrationBrian Carlstrom2010-11-041-6/+14
|/ | | | | Bug: 3041575 Change-Id: Ifa8f548c217210014c2aaff044fb4871629f47a7
* Skip empty samples in the sampling profiler.Jesse Wilson2010-11-011-0/+3
| | | | | | | Without this writeHprofData crashes when trying to read the first element from that array. Change-Id: I6ab25a9776bbe99be2923835883fb51d4ac7ed4a
* am 2e37069e: Change SamplingProfiler to use a sampling interval instead of HzBrian Carlstrom2010-11-011-9/+9
|\ | | | | | | | | * commit '2e37069eaff2f16a539e739ca02c770aa889ed7b': Change SamplingProfiler to use a sampling interval instead of Hz
| * Change SamplingProfiler to use a sampling interval instead of HzBrian Carlstrom2010-11-011-9/+9
| | | | | | | | Change-Id: Ia88ce2863dac277e071ea05d39e7b8af2568d3f4
* | am 6cbbd111: Don\'t BlockGuard on INetworkSystem.isConnected w/ 0 timeout.Brad Fitzpatrick2010-10-291-1/+6
|\ \ | |/ | | | | | | * commit '6cbbd111d6e7505fb0b4ad362aba0de371b893d3': Don't BlockGuard on INetworkSystem.isConnected w/ 0 timeout.
| * Don't BlockGuard on INetworkSystem.isConnected w/ 0 timeout.Brad Fitzpatrick2010-10-291-1/+6
| | | | | | | | Change-Id: Ie75e292051f377c15f35d1823a33e4a693ebc071
* | am d1280478: am cb5204fe: am 09b06cc1: Set capabilities sooner.Andy McFadden2010-10-271-1/+4
|\ \ | |/
| * am cb5204fe: am 09b06cc1: Set capabilities sooner.Andy McFadden2010-10-271-1/+4
| |\
| | * Set capabilities sooner.Andy McFadden2010-10-271-1/+4
| | | | | | | | | | | | | | | | | | Bug 3135433. Change-Id: Ief58bdfff2cb82d7824ef796c2c1031f525f6ee9
* | | Close process-spawned streams when the process is destroyed.Jesse Wilson2010-10-251-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is consistent with the RI's behavior. I can't come up with a reasonable approach to closing these streams if they are never requested; that's presumably a finalizer problem anyway because only the finalizer knows that the streams won't be needed. This change also adds test infrastructure around CloseGuard. My approach hooks into the logger rather than reflection because I can't be sure where the CloseGuard instance would be in the object hierarchy. This approach also degrades reasonably when run on the reference implementation (where it passes). Change-Id: I08e882494d69d4245e40fb1035edbc6d3df23fbc http://b/3111120
* | | am 5f3c50f9: am 6a4f4c86: am 13727ea1: Fix SamplingProfiler for use in zygoteBrian Carlstrom2010-10-211-2/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | Merge commit '5f3c50f96e0ab4f84bef5e41a82471f781169daa' into dalvik-dev * commit '5f3c50f96e0ab4f84bef5e41a82471f781169daa': Fix SamplingProfiler for use in zygote
| * | am 6a4f4c86: am 13727ea1: Fix SamplingProfiler for use in zygoteBrian Carlstrom2010-10-211-2/+3
| |\ \ | | |/ | | | | | | | | | | | | | | | Merge commit '6a4f4c869a9d24f104c11c49bbc3e5238975869b' * commit '6a4f4c869a9d24f104c11c49bbc3e5238975869b': Fix SamplingProfiler for use in zygote
| | * Fix SamplingProfiler for use in zygoteBrian Carlstrom2010-10-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two small fixes to fix SamplingProfilerIntegration: - Fix name of Timer thread to match native code, allowing "set prop persist.sampling_profiler 1" to profile startup of apps. - clone newThreads array since ThreadSet may reuse it internally (which is the case in SamplingProfilerIntegration's use of SamplingProfiler.newThreadGroupTheadSet) Bug: 3117365 Change-Id: Ic8c2779b7961a39b87494253bb99c56e6e35ae15
* | | am 490a5fc2: am c009f346: am b27ce0cf: Clean up the construction-time ↵Dan Bornstein2010-10-193-77/+44
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | arrangements. Merge commit '490a5fc23d6cec32b265b9782b1a73aa13779063' into dalvik-dev * commit '490a5fc23d6cec32b265b9782b1a73aa13779063': Clean up the construction-time arrangements.
| * | am c009f346: am b27ce0cf: Clean up the construction-time arrangements.Dan Bornstein2010-10-193-77/+44
| |\ \ | | |/ | | | | | | | | | | | | | | | Merge commit 'c009f346c827aad63df5d3ebec169443a0e9ebf2' * commit 'c009f346c827aad63df5d3ebec169443a0e9ebf2': Clean up the construction-time arrangements.
| | * Clean up the construction-time arrangements.Dan Bornstein2010-10-153-77/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was all sorts of code here that pointlessly pushed the bulk of the constructor operation off to instance methods, which (a) could cause confusion when there's bona fide trouble -- that is, it's better to throw in the constructor -- and (b) didn't really help with efficiency in any realistic scenario -- that is, while the original code nominally avoided extra work until first use, in practice first use occurs immediately after construction (and in the same thread, even). Now, all the one-time work happens in the constructor, and we get to avoid asking "am I set up yet?" before doing anything substantive. While I was in the territory, I also did a bit of more minor code hygiene maintenance. Change-Id: I41225d373e3ab481b6bc3da5b74bde89c4fd895e
* | | Revised CloseGuard usage patternBrian Carlstrom2010-10-112-26/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CloseGuard.get() instants are now "unopened" - In constructor cases, guard.open("...") is now at the end - In metod cases, guard.open("...") is now after resource acquisition - guard null pointer checks in finalizers in case constructor threw exception Bug: 2645458 Change-Id: Ieb874a8c33b347768a9fa7437b3dd16f3d56d886
* | | CloseGuard: finalizers for closeable objects should log complaintsBrian Carlstrom2010-10-042-1/+175
|/ / | | | | | | | | | | | | | | | | | | | | | | Introducing CloseGuard which warns when resources are implictly cleaned up by finalizers when an explicit termination method, to use the Effective Java "Issue 7: Avoid finalizers" terminology, should have been used by the caller. libcore classes that can use CloseGuard now do so. Bug: 3041575 Change-Id: I4a4e3554addaf3075c823feb0a0ff0ad1c1f6196