ProfileSaver: query profiling_infos instead of the code_map

This is the first step in being able to record profiles without jit
being active.

Bug: 27916886

(cherry picked from commit e2d066d0337b7c81d47e4806e6025b70d83fcd56)

Change-Id: Ie36c4b4a11d3b6e5de959121a1acea22a9e25121
diff --git a/runtime/jit/offline_profiling_info.h b/runtime/jit/offline_profiling_info.h
index c4055b3..5a07da7 100644
--- a/runtime/jit/offline_profiling_info.h
+++ b/runtime/jit/offline_profiling_info.h
@@ -28,9 +28,6 @@
 
 namespace art {
 
-class ArtMethod;
-class DexCacheProfileData;
-
 // TODO: rename file.
 /**
  * Profile information in a format suitable to be queried by the compiler and
@@ -45,7 +42,7 @@
   static const uint8_t kProfileVersion[];
 
   // Add the given methods and classes to the current profile object.
-  bool AddMethodsAndClasses(const std::vector<ArtMethod*>& methods,
+  bool AddMethodsAndClasses(const std::vector<MethodReference>& methods,
                             const std::set<DexCacheResolvedClasses>& resolved_classes);
   // Loads profile information from the given file descriptor.
   bool Load(int fd);
@@ -114,8 +111,7 @@
   DexFileData* GetOrAddDexFileData(const std::string& dex_location, uint32_t checksum);
   bool AddMethodIndex(const std::string& dex_location, uint32_t checksum, uint16_t method_idx);
   bool AddClassIndex(const std::string& dex_location, uint32_t checksum, uint16_t class_idx);
-  bool AddResolvedClasses(const DexCacheResolvedClasses& classes)
-      SHARED_REQUIRES(Locks::mutator_lock_);
+  bool AddResolvedClasses(const DexCacheResolvedClasses& classes);
 
   // Parsing functionality.