Only log an error if an unattached thread is unregistered.

Turn a fatal check into a diagnostic error. It looks like this issue arises
when a runtime shutsdown without properly being started.
Bug: 17011539

Change-Id: I2983c8332e83769e9480e8f30a46ca3b80a2e90e
(cherry picked from commit e2bcf579b0bc2f53db68c38755d69543198c7b00)
Add allocation tracking allocators to ROSAlloc

Used to monitor native memory usage, results are approximately
12-100KB memory per app.

Change-Id: If5a46cd8d543851948a8cb69487f3044965b44ce
Avoid crash in StringReference.Value JDWP command

Checks for null or invalid object id. Also checks whether the corresponding
object is a java.lang.String.

Bug: 17492221
Bug: 15005460

(cherry picked from commit 29259fa6b0514866d2d4bf57d58c1557b26abbb7)

Change-Id: I52673bdef6912a4cccf5a6eeecb6e1e817b9dd6b
Merge "Avoid crash in StringReference.Value JDWP command"
Add CFG and SSA form checkers in the optimizing compiler.

Checks performed on control-flow graphs:
- Ensure that the predecessors and successors of a basic block are
  consistent within a control-flow graph.
- Ensure basic blocks end with a branch instruction.
- Detect phi functions listed in non-phi instruction lists and vice
  versa.
- Ensure a block's instructions (and phi functions) are associated
  with this very block.

Checks performed on SSA form graphs:
- Ensure an instruction dominates all its uses.
- Ensure there are no critical edges.

Change-Id: I1c12b4a61ecf608682152c897980ababa7eca847
Initiate a dead code elimination pass in the optimizing compiler.

Change-Id: Ie9db5d8e2c2c30e34145a0f7d2386b8ec58cfc4e
Merge "Add allocation tracking allocators to ROSAlloc"
Avoid suspending for alloc trace enabling when already suspended.

Bug: 17499772

(cherry picked from commit 1d6ee090fddd4bfd35c304d6ceb929d5c529dfcc)

Change-Id: Id09809c476c685f0a197ee75bb08638931364efd
ART: Sync oat file to disk before patching

Bug: 15567083, 17439961, 17510489, 17478752

(cherry picked from commit 035592c51fee2995a3d90a9043f91a7a3128df2b)

Change-Id: I828dc6775044b5050c2520eb097abe6a920fd3ee
ART: Avoid recursive abort on thread dump

Also clean up unused variable.

Bug: 15567083
Change-Id: Id83a3784bbe88520a4ffe654b2553d36a7b8e5bc
(cherry picked from commit 2f9e21503c2b6958213f9a2610023c7ab8a01707)
Merge "ART: Sync oat file to disk before patching"
Merge "ART: Avoid recursive abort on thread dump"
Merge "Avoid suspending for alloc trace enabling when already suspended."
Merge "Only log an error if an unattached thread is unregistered."
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

(cherry picked from commit bf5d818f7e59ce33521ad81bbab68b1e7a09e0ba)

Change-Id: If99b47c3191c69feee319c9d73537e827ba0cc1d
Merge "ART: skip compilation of huge methods."
Add allocation rate tracking to systrace.

Bug: 16956980

(cherry picked from commit 837150818af0eee993f7d93c5a50c3c7b46f1dab)

Change-Id: I3d0b18bfb9db24917f055f66f08f5f4168301867
Merge "Add allocation rate tracking to systrace."
Restore some aosp/master changes lost in cherry-pick 7c438b19b71932ac8a44eff44f20744a01559c8d

Change-Id: Ic9fe8a235baac85efbdf748aeaddf98139558c4e
Merge "Restore some aosp/master changes lost in cherry-pick 7c438b19b71932ac8a44eff44f20744a01559c8d"