jitzygote: compile system server methods at boot.

Test: m && boots
Bug: 119800099
Change-Id: Ia02a68bc3f152fe9a733577e66f327264518fe6b
diff --git a/runtime/jit/jit.h b/runtime/jit/jit.h
index 15cdacb..4b81f71 100644
--- a/runtime/jit/jit.h
+++ b/runtime/jit/jit.h
@@ -21,6 +21,7 @@
 #include "base/macros.h"
 #include "base/mutex.h"
 #include "base/timing_logger.h"
+#include "handle.h"
 #include "jit/profile_saver_options.h"
 #include "obj_ptr.h"
 #include "thread_pool.h"
@@ -29,6 +30,7 @@
 
 class ArtMethod;
 class ClassLinker;
+class DexFile;
 class OatDexFile;
 struct RuntimeArgumentMap;
 union JValue;
@@ -36,6 +38,7 @@
 namespace mirror {
 class Object;
 class Class;
+class ClassLoader;
 }   // namespace mirror
 
 namespace jit {
@@ -304,9 +307,19 @@
   // Adjust state after forking.
   void PostZygoteFork();
 
-  // In case the boot classpath is not fully AOTed, add methods from the boot profile to the
-  // compilation queue.
-  void AddNonAotBootMethodsToQueue(Thread* self);
+  // Compile methods from the given profile. If `add_to_queue` is true, methods
+  // in the profile are added to the JIT queue. Otherwise they are compiled
+  // directly.
+  void CompileMethodsFromProfile(Thread* self,
+                                 const std::vector<const DexFile*>& dex_files,
+                                 const std::string& profile_path,
+                                 Handle<mirror::ClassLoader> class_loader,
+                                 bool add_to_queue);
+
+  // Register the dex files to the JIT. This is to perform any compilation/optimization
+  // at the point of loading the dex files.
+  void RegisterDexFiles(const std::vector<std::unique_ptr<const DexFile>>& dex_files,
+                        ObjPtr<mirror::ClassLoader> class_loader);
 
  private:
   Jit(JitCodeCache* code_cache, JitOptions* options);