Save the JIT compiled code when the class isn't initialized yet.
When a class isn't initialized, we put resolution stubs to its
static methods. In order to fetch the compiled code at the point of
initialization, save it in the profiling info.
Bug: 119800099
Test: start an app, no JIT compilation of boot classpath methods
Change-Id: I32b947318dbcb1010c94a11b51ea39d992d247e3
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index 8a6cebe..fabb978 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -262,6 +262,12 @@
REQUIRES(!lock_)
REQUIRES_SHARED(Locks::mutator_lock_);
+ // Fetch the entrypoint that zygote may have saved for a method. The zygote saves an entrypoint
+ // only for the case when the method's declaring class is not initialized.
+ const void* GetZygoteSavedEntryPoint(ArtMethod* method)
+ REQUIRES(!lock_)
+ REQUIRES_SHARED(Locks::mutator_lock_);
+
void PostForkChildAction(bool is_system_server, bool is_zygote);
// Clear the entrypoints of JIT compiled methods that belong in the zygote space.