OSDN Git Service

android-x86/dalvik.git
13 years agoam ef4b0613: am e9503ef8: am 886130bc: (-s ours) Two patches.
Andy McFadden [Tue, 9 Nov 2010 04:00:39 +0000 (20:00 -0800)]
am ef4b0613: am e9503ef8: am 886130bc: (-s ours) Two patches.

* commit 'ef4b0613d6952770aefac07d503955eb7b962d2b':
  Two patches.

13 years agoam e9503ef8: am 886130bc: (-s ours) Two patches.
Andy McFadden [Tue, 9 Nov 2010 03:38:19 +0000 (19:38 -0800)]
am e9503ef8: am 886130bc: (-s ours) Two patches.

* commit 'e9503ef8c460f4818062ecc80a9e0b4f8c6745b8':
  Two patches.

13 years agoam 886130bc: (-s ours) Two patches.
Andy McFadden [Tue, 9 Nov 2010 02:13:32 +0000 (18:13 -0800)]
am 886130bc: (-s ours) Two patches.

* commit '886130bc7ff992940e152636f57072e58c91aa2e':
  Two patches.

13 years agoTwo patches.
Andy McFadden [Tue, 9 Nov 2010 01:05:39 +0000 (17:05 -0800)]
Two patches.

Patch 1a+1b: Set capabilities sooner.

(cherry-pick from gingerbread I22fde728bd5d65774f8fdf1fa45956fe18358c4c)
(hand-pick from gingerbread Ief58bdfff2cb82d7824ef796c2c1031f525f6ee9,
 plus minor tweak to avoid altering the API)

Patch 3: If there's an error dropping privileges, abort.

(cherry-pick from gingerbread I85ce12e93cb8c297add756dc3b872b8346eda00b)

Bug 3176774

Change-Id: If8285d7bfd5a466bd77c0f7ffadf1bf96d31db06

13 years agoMerge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Elliott Hughes [Thu, 4 Nov 2010 18:03:57 +0000 (11:03 -0700)]
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

13 years agoMerge "More prep work for new opcodes." into dalvik-dev
Dan Bornstein [Thu, 4 Nov 2010 17:49:29 +0000 (10:49 -0700)]
Merge "More prep work for new opcodes." into dalvik-dev

13 years agoam d325011f: Shift register index tests to static pass.
Andy McFadden [Thu, 4 Nov 2010 17:40:27 +0000 (10:40 -0700)]
am d325011f: Shift register index tests to static pass.

* commit 'd325011fc98e0f1179d467bbc284cccea72f560b':
  Shift register index tests to static pass.

13 years agoShift register index tests to static pass.
Andy McFadden [Wed, 3 Nov 2010 21:32:42 +0000 (14:32 -0700)]
Shift register index tests to static pass.

This rather hefty change moves the range tests on register index values
from the code-flow pass to the earlier static analysis pass.  The idea
is to test everything up front so that we don't have to do a bounds
check every time we get or set a register value during verification.

This allowed some simplification in the code-flow pass, since get/set
of a register no longer needs to have the method register count passed
in, and can no longer fail due to bad input.

As part of doing this, some of the static verification code was
cleaned up, e.g. the instruction decoding is now only done in one place.

This had no apparently effect on performance on nexus one -- verify+opt
of the bootstrap classes takes the same amount of time.  However, it
does reduce the compiled size of the humongous instruction verification
method by about 10%.

Also, cleaned up some instruction format stuff (e.g. removed 3rfs).

Bug 2534655.

(cherry-pick from dalvik-dev)

Change-Id: I1b220f4e97b1214ed575470695c52e1bd64d5137

13 years agoMore prep work for new opcodes.
Dan Bornstein [Thu, 4 Nov 2010 17:17:14 +0000 (10:17 -0700)]
More prep work for new opcodes.

The opcode-gen script now expects there to be up to 65536 opcodes, and
it generates opcode chain information. The chaining info isn't used
yet, but eventually it will get hooked into the instruction selection
logic in dx, meaning that dx will no longer have to do relatively
slower opcode searches; the right "next" opcode will have been
staticly generated and compiled in.

I also added a helpful generated comment in RopToDop, which indicates
which opcodes are the ones that *won't* be found by chaining, that is,
which ones are the starts of chains. This is left as a comment and not
code, though, since there are lots of quirks with how these get hooked
up. I hope to make this cleaner at some point, but today's not the day
for it.

Change-Id: I11da833cc57b383733743114c0f3e0e64903982d

13 years agoLine width / spacing tweak.
Dan Bornstein [Thu, 4 Nov 2010 00:17:41 +0000 (17:17 -0700)]
Line width / spacing tweak.

Change-Id: Idf9c4f56b24e2b150c519f8ed140650183b47a88

13 years agoImprove JNI failure logging.
Andy McFadden [Wed, 3 Nov 2010 19:44:13 +0000 (12:44 -0700)]
Improve JNI failure logging.

Removed a couple of LOGD warnings.  Added additional detail to the
corresponding exception messages.

Bug 3158451.

Change-Id: I3d1d4e6188f364f592bf396d23c5e7e6da2fe65f

13 years agoMerge "Shift register index tests to static pass." into dalvik-dev
Andy McFadden [Wed, 3 Nov 2010 22:31:17 +0000 (15:31 -0700)]
Merge "Shift register index tests to static pass." into dalvik-dev

13 years agoMerge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Brian Carlstrom [Wed, 3 Nov 2010 18:05:53 +0000 (11:05 -0700)]
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

Change-Id: I0731a0f623694d15d311dae1450a50e105905421

13 years agoShift register index tests to static pass.
Andy McFadden [Wed, 3 Nov 2010 21:32:42 +0000 (14:32 -0700)]
Shift register index tests to static pass.

This rather hefty change moves the range tests on register index values
from the code-flow pass to the earlier static analysis pass.  The idea
is to test everything up front so that we don't have to do a bounds
check every time we get or set a register value during verification.

This allowed some simplification in the code-flow pass, since get/set
of a register no longer needs to have the method register count passed
in, and can no longer fail due to bad input.

As part of doing this, some of the static verification code was
cleaned up, e.g. the instruction decoding is now only done in one place.

This had no apparently effect on performance on nexus one -- verify+opt
of the bootstrap classes takes the same amount of time.  However, it
does reduce the compiled size of the humongous instruction verification
method by about 10%.

Also, cleaned up some instruction format stuff (e.g. removed 3rfs).

Bug 2534655.

Change-Id: I3c2a5877bca5ddc3d794b61a46b95a7e5a3c233f

13 years agoMerge "Rework the bytecode format file and parser." into dalvik-dev
Dan Bornstein [Tue, 2 Nov 2010 20:49:24 +0000 (13:49 -0700)]
Merge "Rework the bytecode format file and parser." into dalvik-dev

13 years agoRework the bytecode format file and parser.
Dan Bornstein [Tue, 2 Nov 2010 20:31:15 +0000 (13:31 -0700)]
Rework the bytecode format file and parser.

This change adds a set of "format" commands to the bytecode.txt file
and prefixes each bytecode definition with an "op" keyword. The new
parser script understands both commands (though it mostly ignores the
"format" ones) and is now a little less wedded to the idea that there
can only be 256 opcodes.

This all is in preparation for (a) adding new opcodes, and (b) making
the opcode/instruction fitter a little more efficient.

Change-Id: I1b4e7274da06b197536823148d91f426d049ec19

13 years agoMerge "Remove allocation limit checking." into dalvik-dev
Carl Shapiro [Tue, 2 Nov 2010 00:54:39 +0000 (17:54 -0700)]
Merge "Remove allocation limit checking." into dalvik-dev

13 years agoRemove allocation limit checking.
Carl Shapiro [Mon, 1 Nov 2010 23:26:46 +0000 (16:26 -0700)]
Remove allocation limit checking.

Change-Id: Ie9a23da2baf201c50cad5ba0d0992cec9bcace54

13 years agoMerge "JIT - support for return-void-barrier [Issue 2992352]" into dalvik-dev
buzbee [Mon, 1 Nov 2010 23:23:53 +0000 (16:23 -0700)]
Merge "JIT - support for return-void-barrier [Issue 2992352]" into dalvik-dev

13 years agoMerge "HPROF is here to stay, make WITH_HPROF the default." into dalvik-dev
Carl Shapiro [Mon, 1 Nov 2010 23:17:11 +0000 (16:17 -0700)]
Merge "HPROF is here to stay, make WITH_HPROF the default." into dalvik-dev

13 years agoHPROF is here to stay, make WITH_HPROF the default.
Carl Shapiro [Mon, 1 Nov 2010 22:43:18 +0000 (15:43 -0700)]
HPROF is here to stay, make WITH_HPROF the default.

Change-Id: Ic9947461daa21641fd9d34d52b6c7998716d8ab2

13 years agoJIT - support for return-void-barrier [Issue 2992352]
buzbee [Mon, 1 Nov 2010 22:53:27 +0000 (15:53 -0700)]
JIT - support for return-void-barrier [Issue 2992352]

Slight reworking of the memory barrier instruction generation to
generalize it, and then add "dmb st" for the new return-void-barrier
instruction.

Change-Id: Iad95aa5b0ba9b616a17dcbe4c6ca2e3906bb49dc

13 years agoAlways dump blocks in label order.
Dan Bornstein [Mon, 1 Nov 2010 19:58:08 +0000 (12:58 -0700)]
Always dump blocks in label order.

This removes some cases of spurious test failure. Also did some
minor whitespace and commenting cleanup while I was in the territory.

Change-Id: I6b8f6d0c340625c31bde78394e77abf429367af3

13 years agoMerge "Check that the debug registry has been started before visting it." into dalvik-dev
Carl Shapiro [Mon, 1 Nov 2010 00:54:04 +0000 (17:54 -0700)]
Merge "Check that the debug registry has been started before visting it." into dalvik-dev

13 years agoMerge "Resume all threads after performing an HPROF dump." into dalvik-dev
Carl Shapiro [Mon, 1 Nov 2010 00:53:56 +0000 (17:53 -0700)]
Merge "Resume all threads after performing an HPROF dump." into dalvik-dev

13 years agoCheck that the debug registry has been started before visting it.
Carl Shapiro [Sat, 30 Oct 2010 04:32:52 +0000 (21:32 -0700)]
Check that the debug registry has been started before visting it.

Change-Id: I54605ebcb9a07846bbefc61ea48ba9e148a202fb

13 years agoResume all threads after performing an HPROF dump.
Carl Shapiro [Sat, 30 Oct 2010 02:08:57 +0000 (19:08 -0700)]
Resume all threads after performing an HPROF dump.

Change-Id: I83df8359a5d57e6b7cd79d75acc979024e50effb

13 years agoam 79544e58: am 464104bb: am 1fe34326: am fbe51551: (-s ours) Remove a pointless...
Dan Bornstein [Sat, 30 Oct 2010 01:35:06 +0000 (18:35 -0700)]
am 79544e58: am 464104bb: am 1fe34326: am fbe51551: (-s ours) Remove a pointless test, which just tested a test support class.

* commit '79544e584c5a21c2551051732f7daa0b85afac02':
  Remove a pointless test, which just tested a test support class.

13 years agoam 464104bb: am 1fe34326: am fbe51551: (-s ours) Remove a pointless test, which just...
Dan Bornstein [Sat, 30 Oct 2010 01:33:04 +0000 (18:33 -0700)]
am 464104bb: am 1fe34326: am fbe51551: (-s ours) Remove a pointless test, which just tested a test support class.

* commit '464104bb1bc96949d7638aa79d16431e6ab8da78':
  Remove a pointless test, which just tested a test support class.

13 years agoam 1fe34326: am fbe51551: (-s ours) Remove a pointless test, which just tested a...
Dan Bornstein [Sat, 30 Oct 2010 01:30:57 +0000 (18:30 -0700)]
am 1fe34326: am fbe51551: (-s ours) Remove a pointless test, which just tested a test support class.

* commit '1fe3432661f96bf57b1e3bd91c3c01bd7564e6ae':
  Remove a pointless test, which just tested a test support class.

13 years agoam fbe51551: (-s ours) Remove a pointless test, which just tested a test support...
Dan Bornstein [Sat, 30 Oct 2010 01:29:27 +0000 (18:29 -0700)]
am fbe51551: (-s ours) Remove a pointless test, which just tested a test support class.

* commit 'fbe515510323ee65ce594b8eda5547c1cbfb8ad9':
  Remove a pointless test, which just tested a test support class.

13 years agoRemove a pointless test, which just tested a test support class.
Dan Bornstein [Sat, 30 Oct 2010 01:23:19 +0000 (18:23 -0700)]
Remove a pointless test, which just tested a test support class.

Change-Id: Ia6d47860ad71f013fef5631bcd434c2f6f1d346f

13 years agoam 99bb6ef3: am 32d0157d: am 66b96b42: am 3144eec0: (-s ours) Replace the implementat...
Dan Bornstein [Sat, 30 Oct 2010 00:05:43 +0000 (17:05 -0700)]
am 99bb6ef3: am 32d0157d: am 66b96b42: am 3144eec0: (-s ours) Replace the implementation of this class.

* commit '99bb6ef3043d4628e6e0da012df9920cd31735ce':
  Replace the implementation of this class.

13 years agoam 32d0157d: am 66b96b42: am 3144eec0: (-s ours) Replace the implementation of this...
Dan Bornstein [Sat, 30 Oct 2010 00:04:21 +0000 (17:04 -0700)]
am 32d0157d: am 66b96b42: am 3144eec0: (-s ours) Replace the implementation of this class.

* commit '32d0157dfef33fa48d195d2a467dd511ec7ef347':
  Replace the implementation of this class.

13 years agoam 66b96b42: am 3144eec0: (-s ours) Replace the implementation of this class.
Dan Bornstein [Sat, 30 Oct 2010 00:02:39 +0000 (17:02 -0700)]
am 66b96b42: am 3144eec0: (-s ours) Replace the implementation of this class.

* commit '66b96b42ba1d21027b71ca65821648925c661a78':
  Replace the implementation of this class.

13 years agoam 3144eec0: (-s ours) Replace the implementation of this class.
Dan Bornstein [Sat, 30 Oct 2010 00:00:32 +0000 (17:00 -0700)]
am 3144eec0: (-s ours) Replace the implementation of this class.

* commit '3144eec027b6a0de24f024c286e4544b1aca683b':
  Replace the implementation of this class.

13 years agoMerge "Reclassify the pin table as a VM internal root. The native stack classificati...
Carl Shapiro [Fri, 29 Oct 2010 22:35:17 +0000 (15:35 -0700)]
Merge "Reclassify the pin table as a VM internal root.  The native stack classification requires an associated thread but are not directly associated with a thread.  If we encounter an object in the pin table during an hprof dump hat will fail." into dalvik-dev

13 years agoReplace the implementation of this class.
Dan Bornstein [Fri, 29 Oct 2010 22:27:54 +0000 (15:27 -0700)]
Replace the implementation of this class.

Use the Apache Harmony version.

Change-Id: Ica3b4c69ccd1cd4c91325c52fad5a71695d58ba4

13 years agoReclassify the pin table as a VM internal root. The native stack
Carl Shapiro [Fri, 29 Oct 2010 22:14:28 +0000 (15:14 -0700)]
Reclassify the pin table as a VM internal root.  The native stack
classification requires an associated thread but are not directly
associated with a thread.  If we encounter an object in the pin table
during an hprof dump hat will fail.

Change-Id: I9e49f88cd632584b5818c702cf80f3f96ec5da85

13 years agoA bunch of minor cleanups.
Dan Bornstein [Fri, 29 Oct 2010 20:01:27 +0000 (13:01 -0700)]
A bunch of minor cleanups.

I'm reacquainting myself with this code, and figured I might as well
do some of that nit-picky code convention tweakage while I was there.
The only non-whitespace non-comment changes I made were to change the
scope of a couple of methods to be more appropriate.

Change-Id: I550978ed0f5b9ccec938faef7c00d09532832ee4

13 years agoFix expected output of dx test 086.
Dan Bornstein [Fri, 29 Oct 2010 03:11:53 +0000 (20:11 -0700)]
Fix expected output of dx test 086.

It experienced both innocuous block order shift and changes to
content due to the earlier constant value propagation fix.

Change-Id: If97d9cc82e763e9bbd7c3a8ba834f2d994eb694b

13 years agoMerge "Fix the expected output of dx test 083." into dalvik-dev
Dan Bornstein [Fri, 29 Oct 2010 03:11:19 +0000 (20:11 -0700)]
Merge "Fix the expected output of dx test 083." into dalvik-dev

13 years agoFix the expected output of dx test 083.
Dan Bornstein [Fri, 29 Oct 2010 03:08:00 +0000 (20:08 -0700)]
Fix the expected output of dx test 083.

The recent fix to constant value propagation altered the expected output.

Change-Id: I57a2c1d60f2bc1060e116199d7924944ca1eef43

13 years agoSeparate HPROF from the GC.
Carl Shapiro [Wed, 27 Oct 2010 04:07:41 +0000 (21:07 -0700)]
Separate HPROF from the GC.

In the beginning, the only way to traverse the roots and heap was to
piggyback off the garbage collector.  As such, HPROF was implemented
by instrumenting the root- and object traversal routines to check a
mode flag and call into HPROF during a GC when the flag was set.

This change moves the HPROF calls out of the GC and into callbacks
invoked through the visitor.  Notably, it allows HPROF dumps to be
computed at any point in time without invoking a GC and potentially
destroying evidence relating to the cause of an OOM.

Change-Id: I2b74c4f10f35af3ca33b7c0bbfe470a8b586ff66

13 years agoFix dx test 087.
Dan Bornstein [Fri, 29 Oct 2010 00:44:06 +0000 (17:44 -0700)]
Fix dx test 087.

This is another case of block rearrangement.

Change-Id: I402d0056f8b6d314cef2efcfea80337777b20a7d

13 years agoUpdate the expected.txt for dx test 094.
Dan Bornstein [Fri, 29 Oct 2010 00:37:08 +0000 (17:37 -0700)]
Update the expected.txt for dx test 094.

As with a couple previous cases, it looks like the block order
has changed in the output, which isn't significant.

Change-Id: I4aef1da2252b3994875349570aca21043144eed4

13 years agoUp the version number.
Dan Bornstein [Thu, 28 Oct 2010 16:54:57 +0000 (09:54 -0700)]
Up the version number.

Change-Id: Ibf1e0471d1991c0b9ef7df847b427a3aead6fd4d

13 years agoFix propagation of constants.
Dan Bornstein [Wed, 27 Oct 2010 23:30:00 +0000 (16:30 -0700)]
Fix propagation of constants.

In particular, when constructing a rop instruction for a move, if
the source has a known constant value, make the target end up also
having that value.

Change-Id: If172337889134e4a682bb0d8eb4e07ca284ac80e

13 years agoAdded multi-threaded support to processing of class files in dx.
jeffhao [Fri, 22 Oct 2010 00:44:43 +0000 (17:44 -0700)]
Added multi-threaded support to processing of class files in dx.

Change-Id: Ideb54c414073a9651b21ce0697e6444fa80f146d

13 years agoClean up dx test 085.
Dan Bornstein [Wed, 27 Oct 2010 22:39:49 +0000 (15:39 -0700)]
Clean up dx test 085.

The jasmin source had a bug which dx didn't previously catch, which is
now fixed, and I also removed a superfluous <init> method. With that
cleaned up, the test now fails but in a different way, which I believe
is indicative of a real problem, where it looks like a known constant
value is not getting properly propagated.

Change-Id: I3d31045eecc6d71cff2bca98c948dc58371d35a1

13 years agoDx test 083's expected output was wrong.
Dan Bornstein [Wed, 27 Oct 2010 22:09:29 +0000 (15:09 -0700)]
Dx test 083's expected output was wrong.

Like many of these tests, the expected output may change from time to
time due to irrelevant (to the test) changes to unrelated parts of dx.
In this case, at some point the rop block dumper seems to have started
sorting its blocks by label.

Change-Id: Ic82cdf8c7f98713bb67e4267c5dc91f0836a859d

13 years agoMerge "The failure of dx test 105 wasn't actually spurious. Fixed the code." into...
Dan Bornstein [Wed, 27 Oct 2010 21:35:07 +0000 (14:35 -0700)]
Merge "The failure of dx test 105 wasn't actually spurious. Fixed the code." into dalvik-dev

13 years agoam cd507233: am 7f91cf6b: am 3cf48016: Set capabilities sooner.
Andy McFadden [Wed, 27 Oct 2010 20:32:07 +0000 (13:32 -0700)]
am cd507233: am 7f91cf6b: am 3cf48016: Set capabilities sooner.

13 years agoam 7f91cf6b: am 3cf48016: Set capabilities sooner.
Andy McFadden [Wed, 27 Oct 2010 20:28:22 +0000 (13:28 -0700)]
am 7f91cf6b: am 3cf48016: Set capabilities sooner.

13 years agoam 3cf48016: Set capabilities sooner.
Andy McFadden [Wed, 27 Oct 2010 20:25:34 +0000 (13:25 -0700)]
am 3cf48016: Set capabilities sooner.

13 years agoSet capabilities sooner.
Andy McFadden [Wed, 27 Oct 2010 18:25:13 +0000 (11:25 -0700)]
Set capabilities sooner.

Bug 3135433.

Change-Id: I22fde728bd5d65774f8fdf1fa45956fe18358c4c

13 years agoMerge "x86: Improve ArrayIndexOutOfBoundsException detail messages" into dalvik-dev
buzbee [Wed, 27 Oct 2010 19:49:48 +0000 (12:49 -0700)]
Merge "x86: Improve ArrayIndexOutOfBoundsException detail messages" into dalvik-dev

13 years agoThe failure of dx test 105 wasn't actually spurious. Fixed the code.
Dan Bornstein [Wed, 27 Oct 2010 18:51:16 +0000 (11:51 -0700)]
The failure of dx test 105 wasn't actually spurious. Fixed the code.

In particular, for array load and store instructions, dx was being too
aggressive about letting the contents of the stack override the
implied type expected by the instructions. This led to cases where dx
would emit code instead of reporting an error.

The failure on the array load side of things implied that there also
needed to be a new regression test on the store side, since the
existing array store test didn't catch this. So, I added that too in
this change.

Finally, I took this opportunity to do minor whitespace-type cleanups
in a couple of related files that I opened during the course of the
investigation.

Change-Id: I72c644f66afb1108ae43a129ac81b010d072155a

13 years agox86: Improve ArrayIndexOutOfBoundsException detail messages
buzbee [Wed, 27 Oct 2010 18:33:15 +0000 (11:33 -0700)]
x86: Improve ArrayIndexOutOfBoundsException detail messages

issue 3122084

Changes the x86 interpreter to use the new dvmThrowAIOOBE call
for out of bounds exception w/ more useful info.

Change-Id: Ic196cc99c561bf31953993a6928f574e5c5bf831

13 years agoMerge "Remove nio cruft." into dalvik-dev
Elliott Hughes [Wed, 27 Oct 2010 18:24:59 +0000 (11:24 -0700)]
Merge "Remove nio cruft." into dalvik-dev

13 years agoRemove nio cruft.
Elliott Hughes [Wed, 27 Oct 2010 17:11:12 +0000 (10:11 -0700)]
Remove nio cruft.

Change-Id: Ie0dd478f499e9fa40a4af8f10b81df7144a3e813

13 years agoFix a test.
Dan Bornstein [Tue, 26 Oct 2010 23:23:07 +0000 (16:23 -0700)]
Fix a test.

The expected output was wrong. (A previous dx change made the output in
the case in question better.)

Change-Id: I94a180efc83968197d7a0a0fad49cdc6e02338cb

13 years agoMerge "Properly close <address> tag." into dalvik-dev
Andy McFadden [Tue, 26 Oct 2010 23:00:38 +0000 (16:00 -0700)]
Merge "Properly close <address> tag." into dalvik-dev

13 years agoProperly close <address> tag.
Andy McFadden [Tue, 26 Oct 2010 22:59:58 +0000 (15:59 -0700)]
Properly close <address> tag.

Change-Id: I4f86849de25f1d1a35f2356c1f118f3f063674a4

13 years agoMerge "Implement the new instruction formats." into dalvik-dev
Jeff Hao [Tue, 26 Oct 2010 21:35:54 +0000 (14:35 -0700)]
Merge "Implement the new instruction formats." into dalvik-dev

13 years agoMerge "Improve dexdump temp file handling." into dalvik-dev
Andy McFadden [Tue, 26 Oct 2010 19:36:50 +0000 (12:36 -0700)]
Merge "Improve dexdump temp file handling." into dalvik-dev

13 years agoImplement the new instruction formats.
Dan Bornstein [Tue, 26 Oct 2010 19:00:07 +0000 (12:00 -0700)]
Implement the new instruction formats.

I also refactored some of the old code in the process, to minimize
duplication, and I also did a minor cleanup of the format spec.

Change-Id: Ib07ea4ade52aa6ec4fa69000798e0cfb8f10c3a9

13 years agoam 0b33af0c: am 5d992dfa: am 36bd1345: Fix for array lower-bound check for count...
Ben Cheng [Tue, 26 Oct 2010 17:20:43 +0000 (10:20 -0700)]
am 0b33af0c: am 5d992dfa: am 36bd1345: Fix for array lower-bound check for count-down loops.

13 years agoam 5d992dfa: am 36bd1345: Fix for array lower-bound check for count-down loops.
Ben Cheng [Tue, 26 Oct 2010 17:18:38 +0000 (10:18 -0700)]
am 5d992dfa: am 36bd1345: Fix for array lower-bound check for count-down loops.

13 years agoam 36bd1345: Fix for array lower-bound check for count-down loops.
Ben Cheng [Tue, 26 Oct 2010 17:16:28 +0000 (10:16 -0700)]
am 36bd1345: Fix for array lower-bound check for count-down loops.

13 years agoMerge "Correct verifier merging of primitive arrays" into dalvik-dev
Andy McFadden [Tue, 26 Oct 2010 14:44:13 +0000 (07:44 -0700)]
Merge "Correct verifier merging of primitive arrays" into dalvik-dev

13 years agoFix for array lower-bound check for count-down loops.
Ben Cheng [Tue, 26 Oct 2010 03:54:31 +0000 (20:54 -0700)]
Fix for array lower-bound check for count-down loops.

If the counted loop is composed as

for (int i = hi; i >= lo; i--) {
    .. = array[i];
}

The hoisted lower-bound check should be asserting "lo >= 0".
On the other hand if the counted loop is composed as

for (int i = hi; i > lo; i--) {
    .. = array[i];
}

The hoisted lower-bound check should be asserting "lo + 1 >= 0".
Previously these two checks are reversed.

Bug: 3130818
Change-Id: Ibc5a6daa837880e9986e45bbc29d1a5e548be3ae

13 years agoCorrect verifier merging of primitive arrays
Andy McFadden [Mon, 25 Oct 2010 23:13:46 +0000 (16:13 -0700)]
Correct verifier merging of primitive arrays

Merging of primitive array types (e.g. float[][] + String[]) was being
handled by the general-purpose type merge, which was determining the
result to be an Object.  It should have been an Object[].

This changes the verifier to treat arrays of primitive as arrays, but
with one fewer dimension.

Bug: 3130586
Change-Id: I35a6c27256f69f142fa2a8c22bc5f995096c9ae1

13 years agoImprove dexdump temp file handling.
Andy McFadden [Mon, 25 Oct 2010 20:29:43 +0000 (13:29 -0700)]
Improve dexdump temp file handling.

When dexdump is handed a zip or APK, it has to unpack classes.dex to a
temp file.  It currently tries /tmp and /sdcard, neither of which are
likely to exist on a Windows system.

We now print a warning when those directories don't exist, and try to
create the temp file in the current directory.

Bug 3125957.

Change-Id: I7724ce48c35f22ed4b5116dfe5783243107df6a1

13 years agoMerge "A little instruction format housecleaning and prep work." into dalvik-dev
Jeff Hao [Mon, 25 Oct 2010 18:04:36 +0000 (11:04 -0700)]
Merge "A little instruction format housecleaning and prep work." into dalvik-dev

13 years agoA little instruction format housecleaning and prep work.
Dan Bornstein [Mon, 25 Oct 2010 01:30:58 +0000 (18:30 -0700)]
A little instruction format housecleaning and prep work.

Change-Id: Iea9d79d23515090f75cdc32c2123dbfb56e27d3c

13 years agoMerge "Allow nested instruction counting." into dalvik-dev
Andy McFadden [Mon, 25 Oct 2010 14:56:01 +0000 (07:56 -0700)]
Merge "Allow nested instruction counting." into dalvik-dev

13 years agoMerge "Lock thread list, show join target" into dalvik-dev
Andy McFadden [Mon, 25 Oct 2010 14:55:05 +0000 (07:55 -0700)]
Merge "Lock thread list, show join target" into dalvik-dev

13 years agoAllow nested instruction counting.
Andy McFadden [Fri, 22 Oct 2010 22:26:07 +0000 (15:26 -0700)]
Allow nested instruction counting.

It is traditional to store counts in variables with more than one
bit of storage.

Also, fixed some of the decorations.

Bug 2863796.

Change-Id: I167d6803e955159e35e75d1e2924754145ea1361

13 years agoMerge "Don't force optimizations during class init in dexopt." into dalvik-dev
Jeff Hao [Fri, 22 Oct 2010 21:14:58 +0000 (14:14 -0700)]
Merge "Don't force optimizations during class init in dexopt." into dalvik-dev

13 years agoLock thread list, show join target
Andy McFadden [Fri, 22 Oct 2010 20:32:12 +0000 (13:32 -0700)]
Lock thread list, show join target

There were some paths to "thread list lock must be held" functions that
weren't locking the thread list.  We now do trylock/unlock in dumpFrames
to ensure that doesn't happen.

Also, append "tid=N" to the "waiting on" line in stack trace output
when we're waiting on a VMThread object (i.e. we're in Thread.join()).

Bug 2827015 (for the thread list lock).

Change-Id: I05aa27dd440c671b22ef7cfe47e31dfe54b0ed2d

13 years agoresolved conflicts for merge of dfc99234 to dalvik-dev
Ben Cheng [Fri, 22 Oct 2010 20:32:07 +0000 (13:32 -0700)]
resolved conflicts for merge of dfc99234 to dalvik-dev

Change-Id: I0b5b19f9f6cd7aa0b3b51e0f9b87ce21c3175771

13 years agoDon't force optimizations during class init in dexopt.
Andy McFadden [Fri, 22 Oct 2010 19:41:33 +0000 (12:41 -0700)]
Don't force optimizations during class init in dexopt.

Some "optimizations" are mandatory, notably those having to do with
access to volatile fields.  We get into an odd situation in dexopt
where we have to initialize and execute <clinit> in a few classes
(primarily Class and Object), but if optimizations are disabled we
don't want to write optimized instructions into the output DEX.

This modifies the class init code to skip the mandatory optimizations
if we're in dexopt.  Either the optimization will happen as a normal
part of dexopt operation, or it won't (in which case it'll be applied
when the class is first loaded in a normal VM).

Bug 3099161.

Change-Id: I11ee5affd5e3ac5a1e8583241acdf3c4de033a96

13 years agoMerge "Avoid conditional loads if WORKAROUND_CORTEX_A9_745320 is defined."
Ben Cheng [Fri, 22 Oct 2010 17:49:18 +0000 (10:49 -0700)]
Merge "Avoid conditional loads if WORKAROUND_CORTEX_A9_745320 is defined."

13 years agoAvoid conditional loads if WORKAROUND_CORTEX_A9_745320 is defined.
Ben Cheng [Fri, 22 Oct 2010 17:15:03 +0000 (10:15 -0700)]
Avoid conditional loads if WORKAROUND_CORTEX_A9_745320 is defined.

No noticeable performance impact by this change.

Bug: 3117632
Change-Id: I31c6adc6cb9999498bb456f1e87f6f04f33e4144

13 years agoRemove junk from platform.S now armv4t is gone.
Elliott Hughes [Fri, 22 Oct 2010 00:44:25 +0000 (17:44 -0700)]
Remove junk from platform.S now armv4t is gone.

Change-Id: I30079aacc753c89cfc3a3f64bd900a0cc858d65f

13 years agoDetail messages for ArrayIndexOutOfBoundsExceptions.
Elliott Hughes [Thu, 21 Oct 2010 20:02:56 +0000 (13:02 -0700)]
Detail messages for ArrayIndexOutOfBoundsExceptions.

This adds ARM fast interpreter and JIT support. x86 is still missing.

Change-Id: Ide46fd9dcd06780193848f594ce7d1491d7f5a96

13 years agoMerge "Remove armv4t support." into dalvik-dev
Elliott Hughes [Thu, 21 Oct 2010 23:07:33 +0000 (16:07 -0700)]
Merge "Remove armv4t support." into dalvik-dev

13 years agoRemove armv4t support.
Elliott Hughes [Thu, 21 Oct 2010 22:44:11 +0000 (15:44 -0700)]
Remove armv4t support.

This was never finished, and hasn't been maintained. And the hardware's
totally obsolete.

Change-Id: Icbf78e507de3b8be8a8f995b8423cc3c678ab0d3

13 years agoMerge "Improve the card table scan." into dalvik-dev
Carl Shapiro [Thu, 21 Oct 2010 22:43:55 +0000 (15:43 -0700)]
Merge "Improve the card table scan." into dalvik-dev

13 years agoImprove the card table scan.
Carl Shapiro [Thu, 21 Oct 2010 22:35:19 +0000 (15:35 -0700)]
Improve the card table scan.

Instead of scanning the table on card at a time, leverage a few
observations to make the scan somewhat more efficient.  First, fewer
than 1% of cards are dirtied during the concurrent mark.  We can scan
the card table by words instead of inspecting cards individually.
Second, dirtied cards tend to appear in clusters and are often
adjacent to one another.  Instead of starting scans at each dirty
card, we scan the objects on consecutive cards together by resuming
the scan at the lowest address visited.

I have not been able to get good profiling data from the VM so I am
not sure how much this helps.  This code may need some refining once
we get our hands on applications with larger heaps.

Change-Id: I30bc6bb14bc268fe404bc1629e44247f1ef8a6f2

13 years agoMinor clarifications and cleanup.
Dan Bornstein [Thu, 21 Oct 2010 21:55:56 +0000 (14:55 -0700)]
Minor clarifications and cleanup.

Change-Id: I571ca9ac8f7a258a6e5d19208f382f42ee0aab22

13 years agoMerge "One more format and our first set of wide opcodes." into dalvik-dev
Dan Bornstein [Thu, 21 Oct 2010 21:04:43 +0000 (14:04 -0700)]
Merge "One more format and our first set of wide opcodes." into dalvik-dev

13 years agoam 28074c85: Merge "Fix debug statements."
Patrick Scott [Thu, 21 Oct 2010 20:30:48 +0000 (13:30 -0700)]
am 28074c85: Merge "Fix debug statements."

Merge commit '28074c8562f785bc6d7d785299bfb7eb6d111036' into dalvik-dev

* commit '28074c8562f785bc6d7d785299bfb7eb6d111036':
  Fix debug statements.

13 years agoOne more format and our first set of wide opcodes.
Dan Bornstein [Thu, 21 Oct 2010 00:32:39 +0000 (17:32 -0700)]
One more format and our first set of wide opcodes.

Change-Id: I16731c1b66b40022c2e10c93640583ae43659701

13 years agoMerge "Fix debug statements."
Patrick Scott [Thu, 21 Oct 2010 19:43:44 +0000 (12:43 -0700)]
Merge "Fix debug statements."

13 years agoMerge "Rebuild the x86-atom interpreter." into dalvik-dev
Andy McFadden [Thu, 21 Oct 2010 19:38:34 +0000 (12:38 -0700)]
Merge "Rebuild the x86-atom interpreter." into dalvik-dev

13 years agoam 3a3f5d65: am 493d84f8: am 2e3ec716: Fix class loader interning following a String...
Carl Shapiro [Thu, 21 Oct 2010 19:10:28 +0000 (12:10 -0700)]
am 3a3f5d65: am 493d84f8: am 2e3ec716: Fix class loader interning following a String.intern.

Merge commit '3a3f5d65f9bbaf5eb5885b4a72b9600dc0dbbe4e' into dalvik-dev

* commit '3a3f5d65f9bbaf5eb5885b4a72b9600dc0dbbe4e':
  Fix class loader interning following a String.intern.

13 years agoFix debug statements.
Patrick Scott [Thu, 21 Oct 2010 18:50:15 +0000 (14:50 -0400)]
Fix debug statements.

Shows up without NDEBUG.

Change-Id: I1270266369beb783242283af60ee268118c8fb3d

13 years agoRebuild the x86-atom interpreter.
Andy McFadden [Thu, 21 Oct 2010 18:27:22 +0000 (11:27 -0700)]
Rebuild the x86-atom interpreter.

Change-Id: I784e60325a82fd43420e489ee17e2013684c04d2