OSDN Git Service

android-x86/art.git
9 years agoam 1fc7a271: am edfc4ca2: Fix oatdump for no image
Mathieu Chartier [Wed, 15 Oct 2014 18:13:41 +0000 (18:13 +0000)]
am 1fc7a271: am edfc4ca2: Fix oatdump for no image

* commit '1fc7a271f6c8ce844f0af67165c437c859e4e20c':
  Fix oatdump for no image

9 years agoam edfc4ca2: Fix oatdump for no image
Mathieu Chartier [Wed, 15 Oct 2014 18:09:19 +0000 (18:09 +0000)]
am edfc4ca2: Fix oatdump for no image

* commit 'edfc4ca2c8e1de6a1d42700cc0bc41d5b243ea04':
  Fix oatdump for no image

9 years agoFix oatdump for no image
Mathieu Chartier [Wed, 15 Oct 2014 17:39:23 +0000 (10:39 -0700)]
Fix oatdump for no image

Added MemMap::Init if we dont initialize the runtime.

(cherry picked from commit d424d0856927a5d771644b0ef18cb48ef8c04817)
Bug: 18000219

Change-Id: Ice068edea04708551b3fb8b75eae4e97758a18f9

9 years agoFix oatdump for no image
Mathieu Chartier [Wed, 15 Oct 2014 17:39:23 +0000 (10:39 -0700)]
Fix oatdump for no image

Added MemMap::Init if we dont initialize the runtime.

(cherry picked from commit d424d0856927a5d771644b0ef18cb48ef8c04817)
Bug: 18000219

Change-Id: Ice068edea04708551b3fb8b75eae4e97758a18f9

9 years agoMerge "Store exiting thread ids and names while tracing to output later." into lmp...
Jeff Hao [Wed, 15 Oct 2014 00:34:33 +0000 (00:34 +0000)]
Merge "Store exiting thread ids and names while tracing to output later." into lmp-mr1-dev

9 years agoam 84bda8bd: am c54e12a4: Change MemMap::maps_ to not be global variable
Mathieu Chartier [Tue, 14 Oct 2014 23:46:24 +0000 (23:46 +0000)]
am 84bda8bd: am c54e12a4: Change MemMap::maps_ to not be global variable

* commit '84bda8bd567a474bb1a72c45bcda397ca7ecc20b':
  Change MemMap::maps_ to not be global variable

9 years agoam c54e12a4: Change MemMap::maps_ to not be global variable
Mathieu Chartier [Tue, 14 Oct 2014 23:41:27 +0000 (23:41 +0000)]
am c54e12a4: Change MemMap::maps_ to not be global variable

* commit 'c54e12a413e16f90526318f1f466a900a717fbb0':
  Change MemMap::maps_ to not be global variable

9 years agoChange MemMap::maps_ to not be global variable
Mathieu Chartier [Tue, 14 Oct 2014 23:22:41 +0000 (16:22 -0700)]
Change MemMap::maps_ to not be global variable

Runtime.exit() was causing globals to get destructed at the same time
that another thread was using it for allocating a new mem map.

(cherry picked from commit 6e88ef6b604a7a945a466784580c42e6554c1289)

Bug: 17962201
Change-Id: I400cb7b8141d858f3c08a6fe59a02838c04c6962

9 years agoStore exiting thread ids and names while tracing to output later.
Jeff Hao [Tue, 14 Oct 2014 20:12:01 +0000 (13:12 -0700)]
Store exiting thread ids and names while tracing to output later.

Bug: 17909204
Change-Id: I4ce027af7c51fb310d6cdbdf067ae340e4c932ff

9 years agoam 0016e52f: am 5d1c1bbd: Check for errors in ThreadGroupReference JDWP commands
Sebastien Hertz [Tue, 14 Oct 2014 19:56:09 +0000 (19:56 +0000)]
am 0016e52f: am 5d1c1bbd: Check for errors in ThreadGroupReference JDWP commands

* commit '0016e52f1cdb0bb32f63d7b55590a4943dbc87b5':
  Check for errors in ThreadGroupReference JDWP commands

9 years agoam 5d1c1bbd: Check for errors in ThreadGroupReference JDWP commands
Sebastien Hertz [Tue, 14 Oct 2014 15:38:10 +0000 (15:38 +0000)]
am 5d1c1bbd: Check for errors in ThreadGroupReference JDWP commands

* commit '5d1c1bbd4c8a1727027d0ae69277af6f6f6badf3':
  Check for errors in ThreadGroupReference JDWP commands

9 years agoMerge "Optimize JDWP stack local values access" into lmp-mr1-dev
Sebastien Hertz [Mon, 13 Oct 2014 07:46:57 +0000 (07:46 +0000)]
Merge "Optimize JDWP stack local values access" into lmp-mr1-dev

9 years agoMerge "Handlerize throw location in DumpJavaStack" into lmp-mr1-dev
Ian Rogers [Sun, 12 Oct 2014 15:35:54 +0000 (15:35 +0000)]
Merge "Handlerize throw location in DumpJavaStack" into lmp-mr1-dev

9 years agoCheck for errors in ThreadGroupReference JDWP commands
Sebastien Hertz [Mon, 15 Sep 2014 17:21:30 +0000 (19:21 +0200)]
Check for errors in ThreadGroupReference JDWP commands

Returns INVALID_OBJECT error for null or invalid object. Also returns
INVALID_THREAD_GROUP error when the object is not a java.lang.ThreadGroup.

Removes unused Dbg::GetMainThreadGroupId method.

Bug: 17503230
(cherry picked from commit a06430c76981d545b5f2b64a7ef53c44c030cf73)

Change-Id: Ic39d3d2c45bf288fc22d908a3c90a3ca24f1c4d4

9 years agoHandlerize throw location in DumpJavaStack
Ian Rogers [Fri, 10 Oct 2014 22:57:19 +0000 (15:57 -0700)]
Handlerize throw location in DumpJavaStack

Handlerize this object and method during DumpJavaStack.
Bug: 17669899

Change-Id: I2e082137fe7f4c82257fc3b2fb36485a6981f369

9 years agoam fbf94774: am a4fee49a: Don\'t call dlsym from signal context in signal chain
Dave Allison [Fri, 10 Oct 2014 22:52:18 +0000 (22:52 +0000)]
am fbf94774: am a4fee49a: Don\'t call dlsym from signal context in signal chain

* commit 'fbf947740aea2d6e8a770f1b429593600bb3f249':
  Don't call dlsym from signal context in signal chain

9 years agoHold mutator lock in DdmSendHeapSegments for all spaces
Mathieu Chartier [Fri, 10 Oct 2014 19:45:50 +0000 (12:45 -0700)]
Hold mutator lock in DdmSendHeapSegments for all spaces

Previously we were releasing the mutator lock in DdmSendHeapSegments
and only reacquiring it for RosAlloc spaces. This was causing problems
since the HeapChunkCallback access object fields through mirror.

Bug: 17950534
Change-Id: I6bd71f43e84eae8585993da656bf1577095607a9

9 years agoOptimize JDWP stack local values access
Sebastien Hertz [Mon, 1 Sep 2014 15:07:11 +0000 (17:07 +0200)]
Optimize JDWP stack local values access

The StackFrame.GetValues and StackFrame.SetValues JDWP commands can refer to
multiple variables at the same time in a given frame. However we used to walk
the stack until getting to the requested frame for each variable.

Now, we walk the stack only once until getting to the frame so the context is
initialized. Then we read/write value for each variable from this context.

Bug: 17343501
Bug: 15680615
(cherry picked from commit 8009f39c6d63181a6cd0e348ce732997dbdf3d20)

Change-Id: I70f64b25e4b20860f5446b8c540345d5e71ec4a9

9 years agoam a4fee49a: Don\'t call dlsym from signal context in signal chain
Dave Allison [Fri, 10 Oct 2014 15:41:50 +0000 (15:41 +0000)]
am a4fee49a: Don\'t call dlsym from signal context in signal chain

* commit 'a4fee49a5023a3cf8431597950ee87c711d0b81c':
  Don't call dlsym from signal context in signal chain

9 years agoMerge "ART: Stash any exception before dumping a stack" into lmp-mr1-dev
Brian Carlstrom [Fri, 10 Oct 2014 05:54:59 +0000 (05:54 +0000)]
Merge "ART: Stash any exception before dumping a stack" into lmp-mr1-dev

9 years agoDon't call dlsym from signal context in signal chain
Dave Allison [Tue, 16 Sep 2014 17:01:01 +0000 (10:01 -0700)]
Don't call dlsym from signal context in signal chain

It is dangerous to call dlsym from within a signal context
since it takes a lock and can lead to a mutex reentry attempt if
timing is bad.

This change adds an initialization function to the signal chain
that calls dlsym for sigaction and sigprocmask from outside the
signal context (from Runtime::Init()).  The results are cached
in a static variable and used from within the signal context if
necessary.

However, tests don't necessarily call Runtime::Init() so we also
need to deal with the case where the signal chain is not initialized
and perform a lazy initialization from inside sigaction or sigprocmask.
This is always outside a signal context since we have not initialized
the runtime.

Bug: 1749857117896006

(cherry picked from commit cefcea838729287a04174664a76514dd793dd77d)

Change-Id: I9bf8540a1250eadf977ff9af249dbe1c73b5ac63

9 years agoam 056e8fa7: am b90132cb: Fix race in thread list destructor
Mathieu Chartier [Fri, 10 Oct 2014 00:31:20 +0000 (00:31 +0000)]
am 056e8fa7: am b90132cb: Fix race in thread list destructor

* commit '056e8fa7fe39d5b24d17bfd7768c6325984788ad':
  Fix race in thread list destructor

9 years agoam b90132cb: Fix race in thread list destructor
Mathieu Chartier [Thu, 9 Oct 2014 20:46:51 +0000 (20:46 +0000)]
am b90132cb: Fix race in thread list destructor

* commit 'b90132cb5132eaeb4dbfca1e63d79b4005dacec5':
  Fix race in thread list destructor

9 years agoFix race in thread list destructor
Mathieu Chartier [Thu, 9 Oct 2014 19:57:58 +0000 (12:57 -0700)]
Fix race in thread list destructor

The ThreadList::Contains wasn't being guarded by the thread list
lock, which could cause a corrupted thread list if another thread
unregistered itself while std::find was searching the thread list.

Bug: 17896374
Change-Id: I629b1eac3473e3cf7355ebde9080dfd7c58af73a

9 years agoam 7b579f56: am b6404fe0: Disable kEnableJavaStackTraceHandler
Brian Carlstrom [Thu, 9 Oct 2014 19:23:13 +0000 (19:23 +0000)]
am 7b579f56: am b6404fe0: Disable kEnableJavaStackTraceHandler

* commit '7b579f56695d800b05cab0040d229c34c68cca24':
  Disable kEnableJavaStackTraceHandler

9 years agoam b6404fe0: Disable kEnableJavaStackTraceHandler
Brian Carlstrom [Thu, 9 Oct 2014 19:11:15 +0000 (19:11 +0000)]
am b6404fe0: Disable kEnableJavaStackTraceHandler

* commit 'b6404fe0bb782cbbccda88903901fe0096a741d5':
  Disable kEnableJavaStackTraceHandler

9 years agoDump mutator lock for thread suspend timeout
Mathieu Chartier [Wed, 8 Oct 2014 19:17:44 +0000 (12:17 -0700)]
Dump mutator lock for thread suspend timeout

Should help us see if thread suspend timeouts are due to someone
holding on the mutator lock for too long or if it is a missed
futex wake.

Bug: 17837911
Change-Id: I3417156a78f574076d5da17c86836c5a7c76084a

9 years agoDisable kEnableJavaStackTraceHandler
Brian Carlstrom [Wed, 8 Oct 2014 20:56:25 +0000 (13:56 -0700)]
Disable kEnableJavaStackTraceHandler

Bug: 17890306
Change-Id: I76d1d1b709cfcb0cf8fe02f5d28fb746909d682f

9 years agoMerge "Fix mips thread offsets" into lmp-mr1-dev
Mathieu Chartier [Tue, 7 Oct 2014 23:54:38 +0000 (23:54 +0000)]
Merge "Fix mips thread offsets" into lmp-mr1-dev

9 years agoFix mips thread offsets
Mathieu Chartier [Tue, 7 Oct 2014 23:20:14 +0000 (16:20 -0700)]
Fix mips thread offsets

Bug: 17898168
Change-Id: Ia528236458323d86c40fe7a729d2183df3547122

9 years agoam d2aa3bb9: am b9001abf: Add extra logging for lock contention
Mathieu Chartier [Fri, 3 Oct 2014 21:33:22 +0000 (21:33 +0000)]
am d2aa3bb9: am b9001abf: Add extra logging for lock contention

* commit 'd2aa3bb95042fa1d5e1d2b5f9435c7f88f328e9e':
  Add extra logging for lock contention

9 years agoam b9001abf: Add extra logging for lock contention
Mathieu Chartier [Fri, 3 Oct 2014 21:18:33 +0000 (21:18 +0000)]
am b9001abf: Add extra logging for lock contention

* commit 'b9001abff3a45f1ae90536da7dd1ec28a6ae0174':
  Add extra logging for lock contention

9 years agoAdd extra logging for lock contention
Mathieu Chartier [Fri, 3 Oct 2014 20:28:46 +0000 (13:28 -0700)]
Add extra logging for lock contention

When we get contention which is longer than kLongWaitMs (= 100ms) we
log to logcat.

Example output:
W/art     ( 9960): Long monitor contention event with owner method=void com.android.server.am.BroadcastQueue.processNextBroadcast(boolean) from BroadcastQueue.java:542 waiters=1 for 243ms

Bug: 17787391
Change-Id: Id1f92d9c41ec909d221871ecc2ff6181dcec2ed4

9 years agoART: Fix verifier fail message.
Elena Sayapina [Fri, 15 Aug 2014 08:52:42 +0000 (15:52 +0700)]
ART: Fix verifier fail message.

Verifier failure message is corrupted.
The verification failure reason overlaps verification failure location.
MethodVerifier::Fail() method creates failure message stream by
std::ostringstream(failure location) constructor which by default
sets the stream's position indicator to the begging of that stream.
Inserting failure reason to the stream by "<<" then overrides the failure location.
Using std::ostringstream(failure location, std::ostringstream::ate) fixes the issue
by setting the stream's position indicator to the end of the stream on opening.

Signed-off-by: Elena Sayapina <elena.v.sayapina@intel.com>
(cherry picked from commit 78480ecb348beee3f27731e12ec06ade032521d6)

bug: 17790245

Change-Id: I31955e859a4eb01d05318395901e8cd229a6c33c

9 years agoART: Stash any exception before dumping a stack
Andreas Gampe [Fri, 3 Oct 2014 04:00:06 +0000 (21:00 -0700)]
ART: Stash any exception before dumping a stack

Dumping a managed stack entails dumping held locks, in the process
of which the verifier will be run. The verifier works under the
assumption that there were no exceptions when started. This
assumption is violated for example on certain JNI aborts.

The solution is to stash any pending exception before dumping the
stack, and re-installing it afterwards.

Bug: 17669899
Change-Id: I3cd0526b52fce1acaa35fe0e419176478c82be22

9 years agoam 70a96024: am 5be30072: ART: Remove wrong DCHECK
Andreas Gampe [Thu, 2 Oct 2014 05:59:19 +0000 (05:59 +0000)]
am 70a96024: am 5be30072: ART: Remove wrong DCHECK

* commit '70a96024c3f708bda3f007517c248c4ad321ee89':
  ART: Remove wrong DCHECK

9 years agoam 5be30072: ART: Remove wrong DCHECK
Andreas Gampe [Thu, 2 Oct 2014 05:56:38 +0000 (05:56 +0000)]
am 5be30072: ART: Remove wrong DCHECK

* commit '5be30072c5a750617dc3f9380776d074f26d9f32':
  ART: Remove wrong DCHECK

9 years agoART: Remove wrong DCHECK
Andreas Gampe [Thu, 2 Oct 2014 05:15:34 +0000 (22:15 -0700)]
ART: Remove wrong DCHECK

Bug: 17772057
Bug: 17763227
Bug: 17762845

Change-Id: If5d35b8e3e156173f2e47ae86ff48ebfc01ca02d

9 years agoam 11881488: am ba16b079: More native bridge tests
Calin Juravle [Wed, 1 Oct 2014 22:17:36 +0000 (22:17 +0000)]
am 11881488: am ba16b079: More native bridge tests

* commit '1188148803f707c930532a43b3f4bf65bcdfa7aa':
  More native bridge tests

9 years agoam ba16b079: More native bridge tests
Calin Juravle [Wed, 1 Oct 2014 19:53:53 +0000 (19:53 +0000)]
am ba16b079: More native bridge tests

* commit 'ba16b0796aafb6ad4c96c5e10b713d73edc0b857':
  More native bridge tests

9 years agoMore native bridge tests
Calin Juravle [Wed, 1 Oct 2014 17:57:29 +0000 (18:57 +0100)]
More native bridge tests

Test for os.arch.

Bug: 17713104
Change-Id: I2d0f151c512857e4576fa186ce59c41b054bee75

9 years agoam 261c7654: am 228f9251: Merge "ART: Overflow of bound check in ArrayCopy intrinsic...
Bill Buzbee [Wed, 1 Oct 2014 15:13:57 +0000 (15:13 +0000)]
am 261c7654: am 228f9251: Merge "ART: Overflow of bound check in ArrayCopy intrinsic" into lmp-dev

* commit '261c76544467beec79d9329772fe1e05182754ab':
  ART: Overflow of bound check in ArrayCopy intrinsic

9 years agoam 14ddcbab: am 95a93541: Add VMRuntime.isBootClassPathOnDisk
Brian Carlstrom [Wed, 1 Oct 2014 15:13:55 +0000 (15:13 +0000)]
am 14ddcbab: am 95a93541: Add VMRuntime.isBootClassPathOnDisk

* commit '14ddcbab0bc7886fb024d18e7dcaf0d531a31bb6':
  Add VMRuntime.isBootClassPathOnDisk

9 years agoam a3ce2ed2: am 02ff2d41: AddIntrinsicSlowPath with resume requires clobbering
Serguei Katkov [Wed, 1 Oct 2014 15:13:54 +0000 (15:13 +0000)]
am a3ce2ed2: am 02ff2d41: AddIntrinsicSlowPath with resume requires clobbering

* commit 'a3ce2ed2366f6a723c3fed51dad9659b000209bb':
  AddIntrinsicSlowPath with resume requires clobbering

9 years agoam 228f9251: Merge "ART: Overflow of bound check in ArrayCopy intrinsic" into lmp-dev
Bill Buzbee [Wed, 1 Oct 2014 15:04:05 +0000 (15:04 +0000)]
am 228f9251: Merge "ART: Overflow of bound check in ArrayCopy intrinsic" into lmp-dev

* commit '228f9251668efe5ab303f9fb78841ed138954acb':
  ART: Overflow of bound check in ArrayCopy intrinsic

9 years agoam 95a93541: Add VMRuntime.isBootClassPathOnDisk
Brian Carlstrom [Wed, 1 Oct 2014 15:03:34 +0000 (15:03 +0000)]
am 95a93541: Add VMRuntime.isBootClassPathOnDisk

* commit '95a935415d44903b28326424beb4db5c013ef089':
  Add VMRuntime.isBootClassPathOnDisk

9 years agoam 02ff2d41: AddIntrinsicSlowPath with resume requires clobbering
Serguei Katkov [Wed, 1 Oct 2014 14:58:47 +0000 (14:58 +0000)]
am 02ff2d41: AddIntrinsicSlowPath with resume requires clobbering

* commit '02ff2d4187249d26fabe8e5eacc27b99984ee353':
  AddIntrinsicSlowPath with resume requires clobbering

9 years agoMerge "ART: Overflow of bound check in ArrayCopy intrinsic" into lmp-dev
Bill Buzbee [Wed, 1 Oct 2014 13:41:48 +0000 (13:41 +0000)]
Merge "ART: Overflow of bound check in ArrayCopy intrinsic" into lmp-dev

9 years agoAdd VMRuntime.isBootClassPathOnDisk
Brian Carlstrom [Mon, 29 Sep 2014 18:22:54 +0000 (11:22 -0700)]
Add VMRuntime.isBootClassPathOnDisk

Bug: 17679443
Change-Id: I127ffdac3bfe731e9535dfe6a242eb950363d715

9 years agoART: Overflow of bound check in ArrayCopy intrinsic
avignate [Wed, 17 Sep 2014 15:35:07 +0000 (22:35 +0700)]
ART: Overflow of bound check in ArrayCopy intrinsic

System.arraycopy method is implemented as intrinsic on x86. It has
bound check which has a bug to overflow in certain conditions
when summ of array offset and number elements to be copied are
more than MAX_INT. For the methods like CarArrayBuffer.get it
means no OutOfBound exception to be thrown. The proposed
solution fixed that.

b/17711775

Signed-off-by: avignate <aleksey.v.ignatenko@intel.com>
(cherry picked from commit f9f0ed401f7fe4138a71b36719423b908a3b7bfb)

Change-Id: I1d4ca900df262d483a94ebea8fa686ea361772c8

9 years agoAddIntrinsicSlowPath with resume requires clobbering
Serguei Katkov [Thu, 4 Sep 2014 08:21:32 +0000 (15:21 +0700)]
AddIntrinsicSlowPath with resume requires clobbering

AddIntrinsicSlowPath with resume results in a call.
So all temps must be clobbered at the point where
AddIntrinsicSlowPath returns.

(cherry-picked from 9863daf4fdc1a08339edac794452dbc719aef4f1)
Change-Id: If9eb887e295ff5e59920f4da1cef63258ad490b0
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
9 years agoam 53d36bb8: am 6d031046: ART: Update for split native bridge initialization
jgu21 [Mon, 29 Sep 2014 04:20:20 +0000 (04:20 +0000)]
am 53d36bb8: am 6d031046: ART: Update for split native bridge initialization

* commit '53d36bb8b8569304f4954d9d64051e6394b674ab':
  ART: Update for split native bridge initialization

9 years agoam 6d031046: ART: Update for split native bridge initialization
jgu21 [Mon, 29 Sep 2014 03:37:08 +0000 (03:37 +0000)]
am 6d031046: ART: Update for split native bridge initialization

* commit '6d031046eeb5e9f62b657df0695b752e1d0aa583':
  ART: Update for split native bridge initialization

9 years agoART: Update for split native bridge initialization
jgu21 [Wed, 10 Sep 2014 10:57:17 +0000 (06:57 -0400)]
ART: Update for split native bridge initialization

(cherry picked from commit a6da74e941d7cee498ac3880018a1d8dc953c6eb)
(cherry picked from commit 7a536531791293441253cffb6e370ba1150eee96)

Bug: 17671501
Change-Id: Id948e3ab22ac988d96f5d370bba8c3f86d08abff

9 years agoam 75832926: am 11c48fe8: (-s ours) Merge "Optimize get/set reflection performance...
Mathieu Chartier [Sat, 27 Sep 2014 05:52:06 +0000 (05:52 +0000)]
am 75832926: am 11c48fe8: (-s ours) Merge "Optimize get/set reflection performance" into lmp-dev

* commit '7583292663201e941bf6d46a4dce8f87b8569699':
  Optimize get/set reflection performance

9 years agoam 11c48fe8: (-s ours) Merge "Optimize get/set reflection performance" into lmp-dev
Mathieu Chartier [Sat, 27 Sep 2014 05:26:15 +0000 (05:26 +0000)]
am 11c48fe8: (-s ours) Merge "Optimize get/set reflection performance" into lmp-dev

* commit '11c48fe8c541753b57f5770e53a93efe147c60a0':
  Optimize get/set reflection performance

9 years agoMerge "Optimize get/set reflection performance" into lmp-dev
Mathieu Chartier [Sat, 27 Sep 2014 02:07:06 +0000 (02:07 +0000)]
Merge "Optimize get/set reflection performance" into lmp-dev

9 years agoOptimize get/set reflection performance
Mathieu Chartier [Fri, 26 Sep 2014 21:32:37 +0000 (14:32 -0700)]
Optimize get/set reflection performance

Speedups mostly from reducing how often access checks are needed,
and adding more inlining, and adding templates.

Field_getInt from ~850ns -> 350ns.
Field_setInt from ~900ns -> 370ns.

Bug: 14063288
Change-Id: I2441581ff3478c6ae43b6aa49939ff3f07555ec8

9 years agoam dbe4dc12: Merge "Fix broken runtime SetStatsEnabled logic" into lmp-dev
Mathieu Chartier [Fri, 26 Sep 2014 23:12:18 +0000 (23:12 +0000)]
am dbe4dc12: Merge "Fix broken runtime SetStatsEnabled logic" into lmp-dev

* commit 'dbe4dc12b3ff581c32427cffcb0c6885d28ff411':
  Fix broken runtime SetStatsEnabled logic

9 years agoMerge "Fix broken runtime SetStatsEnabled logic" into lmp-dev
Mathieu Chartier [Fri, 26 Sep 2014 23:04:14 +0000 (23:04 +0000)]
Merge "Fix broken runtime SetStatsEnabled logic" into lmp-dev

9 years agoam ed34f59c: Merge "Quick compiler: aarch64 codegen & long_min literal" into lmp-dev
buzbee [Fri, 26 Sep 2014 22:39:17 +0000 (22:39 +0000)]
am ed34f59c: Merge "Quick compiler: aarch64 codegen & long_min literal" into lmp-dev

* commit 'ed34f59c30f97e51e517d8dfb0741ed059014ff6':
  Quick compiler: aarch64 codegen & long_min literal

9 years agoMerge "Quick compiler: aarch64 codegen & long_min literal" into lmp-dev
buzbee [Fri, 26 Sep 2014 22:26:40 +0000 (22:26 +0000)]
Merge "Quick compiler: aarch64 codegen & long_min literal" into lmp-dev

9 years agoQuick compiler: aarch64 codegen & long_min literal
buzbee [Fri, 26 Sep 2014 22:09:06 +0000 (15:09 -0700)]
Quick compiler: aarch64 codegen & long_min literal

Int64 overflow during instruction selection caused incorrect
code patterns to emitted in some cases of long operations with
an immediate value of 0x8000000000000000.

The code in question was attempting to determine if the immediate
operand would fit in aarch64 immediate instruction variants.

Internal b/17630605

Change-Id: I8177021b73e51302bc1032387d83b1dd567ed6db

9 years agoam 23fb122b: Change heap base address
Mathieu Chartier [Fri, 26 Sep 2014 20:11:44 +0000 (20:11 +0000)]
am 23fb122b: Change heap base address

* commit '23fb122b57c52ab1db98708a4e15765b46b26405':
  Change heap base address

9 years agoChange heap base address
Mathieu Chartier [Fri, 26 Sep 2014 18:37:42 +0000 (11:37 -0700)]
Change heap base address

Moved to 300 MB to allow room for other people who wish to use the
low 1 GB.

Bug: 17671634

Change-Id: Ia434a106f4d8f6050edd79f90b4651b1aa32e823

9 years agoFix broken runtime SetStatsEnabled logic
Mathieu Chartier [Fri, 26 Sep 2014 00:03:12 +0000 (17:03 -0700)]
Fix broken runtime SetStatsEnabled logic

Previously, Runtime::SetStatsEnabled wouldn't take stats_enabled_
into account when deciding whether or not to increment / decrement
teh stats enabled counter. This resulted in counter underflows and
other errors which caused some CTS tests to fail.

Also added some locking to prevent race conditions.

Bug: 17360878

Change-Id: I779237d55dda4f35054a4d27fb2c660a38750fc0

9 years agoMerge "Reduce IndirectReferenceTable memory usage" into lmp-mr1-dev
Mathieu Chartier [Thu, 25 Sep 2014 22:17:03 +0000 (22:17 +0000)]
Merge "Reduce IndirectReferenceTable memory usage" into lmp-mr1-dev

9 years agoMerge "Do not hold breakpoint lock when running the verifier" into lmp-dev
Sebastien Hertz [Thu, 25 Sep 2014 07:22:33 +0000 (07:22 +0000)]
Merge "Do not hold breakpoint lock when running the verifier" into lmp-dev

9 years agoReduce IndirectReferenceTable memory usage
Mathieu Chartier [Wed, 24 Sep 2014 21:24:03 +0000 (14:24 -0700)]
Reduce IndirectReferenceTable memory usage

Changed the slot side table and the main table to be a single
table, reduced number of slots per reference from 4 to 3 to make
the IrtEntry a power of 2 size.

Before:
20848 kB: Dalvik Other

After:
16760 kB: Dalvik Other

Bug: 17643507

Change-Id: I4820ca381e906c2e396208df67f2f53816047bf5

9 years agoMerge "x86: evaluation destination should be after load of source in RA [DO NOT MERGE...
Pat Tjin [Wed, 24 Sep 2014 18:52:12 +0000 (18:52 +0000)]
Merge "x86: evaluation destination should be after load of source in RA [DO NOT MERGE]" into lmp-dev

9 years agoMerge "Restore kReasonLogging for kDexoptNeeded and kPatchoatNeeded" into lmp-dev
Brian Carlstrom [Wed, 24 Sep 2014 16:27:23 +0000 (16:27 +0000)]
Merge "Restore kReasonLogging for kDexoptNeeded and kPatchoatNeeded" into lmp-dev

9 years agox86: evaluation destination should be after load of source in RA [DO NOT MERGE]
Serguei Katkov [Mon, 8 Sep 2014 05:42:27 +0000 (12:42 +0700)]
x86: evaluation destination should be after load of source in RA [DO NOT MERGE]

In almost most cases working with Register Allocator we must first
load source and then evaluate the destination. In this particular case
for byte-code shl-int/2addr v10, v10 we first find a destination (memory)
then load source (v10 -> physical register) and generate a shift operation
on memory. This is ok for this bytecode but RA thinks that v10 is in register
(we loaded source) and this is incorrect because updated value in memory
and physycal register is not up to date.

Change-Id: Ib4c71f70dcbf78b76ca89897e3bd605a89d77d08
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit a464466fea8df617a50055230cfe7a16ea52cc14)

9 years agoMerge "ART: Refactor elf_writer_quick for elf section order" into lmp-dev
Andreas Gampe [Wed, 24 Sep 2014 07:34:10 +0000 (07:34 +0000)]
Merge "ART: Refactor elf_writer_quick for elf section order" into lmp-dev

9 years agoART: Refactor elf_writer_quick for elf section order
Andreas Gampe [Wed, 24 Sep 2014 05:58:07 +0000 (22:58 -0700)]
ART: Refactor elf_writer_quick for elf section order

This writes ELF sections in approximate order (debug sections are
currently out-of-order) to avoid incompletely written files
appearing OK to ART loading code.

Bug: 17622827
Change-Id: I812fd42fcf2823dbfaf5891bf101d3b59406f263

9 years agodex2oat should truncate files opened from file descriptors
Brian Carlstrom [Wed, 24 Sep 2014 04:13:28 +0000 (21:13 -0700)]
dex2oat should truncate files opened from file descriptors

Bug: 17622827
Change-Id: Iff7df6219d517d140f77d2585d32559b440ac497

9 years agoRestore kReasonLogging for kDexoptNeeded and kPatchoatNeeded
Brian Carlstrom [Tue, 23 Sep 2014 20:53:28 +0000 (13:53 -0700)]
Restore kReasonLogging for kDexoptNeeded and kPatchoatNeeded

Bug: 17565501
Change-Id: Id40438b3d3deb36450fd56aee2a93c1c77ee26d4

9 years agoDo not hold breakpoint lock when running the verifier
Sebastien Hertz [Thu, 18 Sep 2014 14:03:34 +0000 (16:03 +0200)]
Do not hold breakpoint lock when running the verifier

When setting a breakpoint, we need to know whether the method may be
inlined. We run the method verifier but that may cause thread
suspension. Therefore we must not hold any lock at this time. The
issue is we do hold the breakpoint lock so we fails a check in debug
mode.

This CL ensures we don't hold the breakpoint lock when running the
method verifier to detect inlining.

Bug: 17562442
(cherry picked from commit 4d1e9ab57e4c822e8e678b1d0c1d6ad2abfa9b3e)

Change-Id: I6daae91e3e82f41006f29959a5c6c0ec0a88194e

9 years agoMerge "Fix JDWP crash when reporting exception" into lmp-dev
Sebastien Hertz [Mon, 22 Sep 2014 07:40:24 +0000 (07:40 +0000)]
Merge "Fix JDWP crash when reporting exception" into lmp-dev

9 years agoMerge "Dump kernel/native stacks of pure native threads." into lmp-dev
Christopher Ferris [Sun, 21 Sep 2014 21:43:05 +0000 (21:43 +0000)]
Merge "Dump kernel/native stacks of pure native threads." into lmp-dev

9 years agoFix sput-wide verification flag.
Logan Chien [Thu, 11 Sep 2014 09:36:05 +0000 (17:36 +0800)]
Fix sput-wide verification flag.

The vA register for sput-wide is a wide register.  Thus, the
verification flag should be kVerifyRegAWide instead of
kVerifyRegA.

Without this change, the invalid Dex bytecode won't be
rejected by VerifyInstruction().  As the result, the
DCHECK_LT() in register_line-inl.h will abort the program.

Change-Id: I24b746d8a85ddaf811d9aebed12a3dd9f97d755f
(cherry picked from commit be8d99c228a76e70a19c1122aabe111c25a2121c)

9 years agoDump kernel/native stacks of pure native threads.
Christopher Ferris [Sat, 20 Sep 2014 00:23:59 +0000 (17:23 -0700)]
Dump kernel/native stacks of pure native threads.

Bug: 16463406
Change-Id: Ifa18d7ec6c60721ce4d3e73944851d1f07372043

9 years agoFix JDWP crash when reporting exception
Sebastien Hertz [Fri, 19 Sep 2014 10:07:51 +0000 (12:07 +0200)]
Fix JDWP crash when reporting exception

The exception's throw location may be null so we need to handle that
case. Also fixes a memset issue.

Bug: 17571297
Change-Id: I954b67207b1ba99a8f3240ce936579dc5644cc69

9 years agoMove spammy logs to JDWP verbose mode
Sebastien Hertz [Thu, 18 Sep 2014 08:20:42 +0000 (10:20 +0200)]
Move spammy logs to JDWP verbose mode

We are spammed by warning messages when debugging, especially each time we
suspend/resume all threads (to update instrumentation or collect monitor info).
It's common to get into the cases where these warnings are logged so they
shouldn't be warning but debug messages.

This CL moves these LOG(WARNING) to VLOG(jdwp) to not disturb developers when
debugging their app (especially when looking for specific messages in logcat).
We keep them in JDWP verbose mode because they help knowing when we initiate
these sequences of "suspend/resume all threads".

Also adds debug suspend count in the log message for more context.

Bug: 17524544
Bug: 17170697

(cherry picked from commit f272af4b9dcd39cdd50fa6655601a26e837eaea9)

Change-Id: I61df70ace1475bf10d83202b6bb774f7036354cb

9 years agoART: Only allow the zygote to create the global boot image
Andreas Gampe [Fri, 19 Sep 2014 03:56:04 +0000 (20:56 -0700)]
ART: Only allow the zygote to create the global boot image

Do not allow arbitrary processes, even when root, to write the
boot image in /data/dalvik-cache.

Bug: 174787521751048917439961
Change-Id: Iba2b74be6d0752f4221f4ff5ee295b45a34cb2e1

9 years agoDO NOT MERGE. Only have a portable entrypoint in portable builds.
Ian Rogers [Thu, 18 Sep 2014 15:56:45 +0000 (08:56 -0700)]
DO NOT MERGE. Only have a portable entrypoint in portable builds.

Bug: 16214885

Change-Id: Iff7b7415efdbdabd7e6020e221a540f6a774c852

9 years agoMerge "Update JDWP event filtering to avoid useless ids" into lmp-dev
Sebastien Hertz [Thu, 18 Sep 2014 12:20:26 +0000 (12:20 +0000)]
Merge "Update JDWP event filtering to avoid useless ids" into lmp-dev

9 years agoART: skip compilation of huge methods.
buzbee [Wed, 17 Sep 2014 20:23:58 +0000 (13:23 -0700)]
ART: skip compilation of huge methods.

Besides not being worthwhile to compile, it huge methods could cause
overflow of some internal compiler structures.

internal b/17524219

Change-Id: I0e47ff4757eec265809598830a2616ac367af77d

9 years agoMerge "Avoid crash in StringReference.Value JDWP command" into lmp-dev
Sebastien Hertz [Wed, 17 Sep 2014 09:46:44 +0000 (09:46 +0000)]
Merge "Avoid crash in StringReference.Value JDWP command" into lmp-dev

9 years agoMerge "ART: Avoid recursive abort on thread dump" into lmp-dev
Andreas Gampe [Wed, 17 Sep 2014 03:31:25 +0000 (03:31 +0000)]
Merge "ART: Avoid recursive abort on thread dump" into lmp-dev

9 years agoART: Sync oat file to disk before patching
Andreas Gampe [Tue, 16 Sep 2014 23:40:09 +0000 (16:40 -0700)]
ART: Sync oat file to disk before patching

Bug: 15567083174399611751048917478752
Change-Id: I828dc6775044b5050c2520eb097abe6a920fd3ee

9 years agoART: Avoid recursive abort on thread dump
Andreas Gampe [Tue, 16 Sep 2014 22:15:13 +0000 (15:15 -0700)]
ART: Avoid recursive abort on thread dump

Also clean up unused variable.

Bug: 15567083
Change-Id: Id83a3784bbe88520a4ffe654b2553d36a7b8e5bc

9 years agoMerge "Avoid suspending for alloc trace enabling when already suspended." into lmp-dev
Jeff Hao [Tue, 16 Sep 2014 21:53:22 +0000 (21:53 +0000)]
Merge "Avoid suspending for alloc trace enabling when already suspended." into lmp-dev

9 years agoAvoid suspending for alloc trace enabling when already suspended.
Jeff Hao [Tue, 16 Sep 2014 01:03:41 +0000 (18:03 -0700)]
Avoid suspending for alloc trace enabling when already suspended.

Bug: 17499772
Change-Id: Id98c10967b28e8859e5ac46f5878c304fb85c498

9 years agoMerge "ART: Check for exceptions from unresolved classes" into lmp-dev
Andreas Gampe [Tue, 16 Sep 2014 18:35:57 +0000 (18:35 +0000)]
Merge "ART: Check for exceptions from unresolved classes" into lmp-dev

9 years agoART: Check for exceptions from unresolved classes
Andreas Gampe [Tue, 16 Sep 2014 18:23:23 +0000 (11:23 -0700)]
ART: Check for exceptions from unresolved classes

In no-verify mode, classes may be unresolved because of missing
dependencies. Ignore and clear the exception.

Bug: 17506140
Change-Id: I70602b089e6631b1e177dbe8316c5fefdaf777a0

9 years agoMerge "Avoid printing absolute addresses in oatdump" into lmp-dev
Brian Carlstrom [Tue, 16 Sep 2014 18:25:29 +0000 (18:25 +0000)]
Merge "Avoid printing absolute addresses in oatdump" into lmp-dev

9 years agoAvoid printing absolute addresses in oatdump
Brian Carlstrom [Mon, 15 Sep 2014 03:34:17 +0000 (20:34 -0700)]
Avoid printing absolute addresses in oatdump

- Added printing of OatClass offsets.
- Added printing of OatMethod offsets.
- Added bounds checks for code size size, code size, mapping table, gc map, vmap table.
- Added sanity check of 100k for code size.
- Added partial disassembly of questionable code.
- Added --no-disassemble to disable disassembly.
- Added --no-dump:vmap to disable vmap dumping.
- Reordered OatMethod info to be in file order.

Bug: 15567083
Change-Id: Id86a21e06d4a28f29f16fd018cba7e55c57f849a

9 years agoMerge "ART: Do not unlink unreadable ELF files" into lmp-dev
Andreas Gampe [Tue, 16 Sep 2014 05:31:05 +0000 (05:31 +0000)]
Merge "ART: Do not unlink unreadable ELF files" into lmp-dev

9 years agoART: Do not unlink unreadable ELF files
Andreas Gampe [Tue, 16 Sep 2014 05:25:24 +0000 (22:25 -0700)]
ART: Do not unlink unreadable ELF files

Unlinking can be racy with respect to secondary oat files.

Bug: 17496483
Change-Id: I53f92a924b34dfcf50d7e02487c5f8f23de627ca

9 years agoMerge "Only log an error if an unattached thread is unregistered." into lmp-dev
Ian Rogers [Mon, 15 Sep 2014 23:08:15 +0000 (23:08 +0000)]
Merge "Only log an error if an unattached thread is unregistered." into lmp-dev