Fix the memory protection issue in RosAllocSpace::CreateFromMemMap()

From the implementation of RosAllocSpace::CreateFromMemMap(), the memory
beyond the starting_size should be protected.
But the argument of mprotect is wrongly set to be "capacity -
initial_size", logically it should be "capacity - starting_size"
This patch also fix the same issue in dlmalloc

Change-Id: Icbd4ba790f344d4fa79d9896657f638a03d6f8aa
Author: Lin Zang <lin.zang@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Fix hardcoded offsets in x86 String.indexOf.

Use runtime code that will work for 32 and 64 bit too.  The old code
copied constants from the runtime .S file and is correct for 32 bit code
only.

Change-Id: I668e1d7f2db8186518c358bde0759633be0d7c40
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Print message when throwing new exception with pending exception.

Useful to see what the new exception is.

Bug: 12957138
Change-Id: I751b3a9b0b5d57d72f15d3ed7fa746a1991b181c
Encode VmapTable entries offset by 2 to reduce size.

We're using special values 0xffff and 0xfffe for an
fp register marker and for method pointer, respectively.
These values were being encoded as 3 bytes each and
this changes their encoding to 1 byte.

Bug: 9437697
Change-Id: Ic1720e898b131a5d3f6ca87d8e1ecdf76fb4160a
Avoid going through char* for std::string API

Bug: 13186058

(cherry picked from commit 14ae4a873e91ae8cb1c00013579b5b058268879d)

Change-Id: Ib529cc10abc2d413e9da65c043dbc2638b734acd
Merge "Encode VmapTable entries offset by 2 to reduce size."
Merge "Avoid going through char* for std::string API"
Move waitpid(2) includes to art::Exec implementation

(cherry picked from commit 446a13ff04dae7ef9c90584e7cf8e834ee841681)

Change-Id: Id5fe3dd8e6c4cef953c39b00f2a53b23da5a6247
Merge "Move waitpid(2) includes to art::Exec implementation"
Merge "Fix hardcoded offsets in x86 String.indexOf."
Merge "Fix the memory protection issue in RosAllocSpace::CreateFromMemMap()"
Implements a BasicBlock iterator using the ArenaBitVector.

Added the implementation of a BasicBlock iterator using the ArenaBitVector.
This patch only adds the implementation of the iterator and does not yet use
 it everywhere it could be.

Added one example in ssa_transformation.cc of its use.

Change-Id: Ia85d58320c80c48a43609265ea5318a416c71f18
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Merge "Implements a BasicBlock iterator using the ArenaBitVector."
Merge "Print message when throwing new exception with pending exception."
(Experimental) Add Brooks pointers.

This feature is disabled by default.

Verified that the Brooks pointers are installed correctly by using the
CMS/SS collectors.

Change-Id: Ia9be9814ab6e29169ac85edc4792ce8c81d552a9
Remove duplicate card pre-cleaning.

Sticky GC was pre-cleaning cards twice since MarkingPhase calls
MarkReachableObjects.

Change-Id: I61572b79c855bcd02085a1f7ff96dd0089db95fb
Merge "Remove duplicate card pre-cleaning."
Fix moving GC bugs in EnterInterpreterFromInvoke.

Calling EnterInterpreterFromInvoke on a static method could cause
class initialization and trash the args before calling the method.

Change-Id: If053d46dd6db403c8ebd1a816c20635194dd0e99
Fix dalvikvm -help

Bug: https://code.google.com/p/android/issues/detail?id=62149
Change-Id: I8ab11cc7c171dc4b7eee1d33aa1624aae832a393
Incorrect result of the "mul-long by 1" operation

ART handles "mul-long by 1" as a special case and try to alloc a new pair
of regs through the EvalLocWide method and then put there the multiplicand
through the StoreValueWide method. But in case when both multiplicand and
multiplier are constants, it will not place correct values in a new reg pair
and result of calculations will be incorrect. The new solution uses the
only StoreValueWide method.

Change-Id: I3d6947737c92c5a12f2840003b17a427e31d288f
Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>