Implement shared counters for boot image / zygote methods.

Add a thread-local counter which the interpreter increments. When
hitting zero, the interpreter goes into the runtime and updates a map of
counters. If the counter for the particular method hits a threshold, we
JIT it.

Test: test.py
Test: imgdiag looking at boot.art
Bug: 162110941

Change-Id: I6493332eafc51856494ef20592ca83bc716c994e
diff --git a/tools/cpp-define-generator/thread.def b/tools/cpp-define-generator/thread.def
index 7df7650..bae9200 100644
--- a/tools/cpp-define-generator/thread.def
+++ b/tools/cpp-define-generator/thread.def
@@ -67,3 +67,5 @@
                .Int32Value())
 ASM_DEFINE(THREAD_READ_BARRIER_MARK_REG00_OFFSET,
            art::Thread::ReadBarrierMarkEntryPointsOffset<art::kRuntimePointerSize>(0))
+ASM_DEFINE(THREAD_SHARED_METHOD_HOTNESS_OFFSET,
+           art::Thread::SharedMethodHotnessOffset<art::kRuntimePointerSize>().Int32Value())