diff options
Diffstat (limited to 'runtime/oat_file_assistant.h')
-rw-r--r-- | runtime/oat_file_assistant.h | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h index a6d0961835..dbfbdf9fbc 100644 --- a/runtime/oat_file_assistant.h +++ b/runtime/oat_file_assistant.h @@ -48,11 +48,6 @@ class ImageSpace; // dex location is in the boot class path. class OatFileAssistant { public: - // The default compile filter to use when optimizing dex file at load time if they - // are out of date. - static const CompilerFilter::Filter kDefaultCompilerFilterForDexLoading = - CompilerFilter::kQuicken; - enum DexOptNeeded { // No dexopt should (or can) be done to update the apk/jar. // Matches Java: dalvik.system.DexFile.NO_DEXOPT_NEEDED = 0 @@ -144,24 +139,6 @@ class OatFileAssistant { // path. bool IsInBootClassPath(); - // Obtains a lock on the target oat file. - // Only one OatFileAssistant object can hold the lock for a target oat file - // at a time. The Lock is released automatically when the OatFileAssistant - // object goes out of scope. The Lock() method must not be called if the - // lock has already been acquired. - // - // Returns true on success. - // Returns false on error, in which case error_msg will contain more - // information on the error. - // - // The 'error_msg' argument must not be null. - // - // This is intended to be used to avoid race conditions when multiple - // processes generate oat files, such as when a foreground Activity and - // a background Service both use DexClassLoaders pointing to the same dex - // file. - bool Lock(std::string* error_msg); - // Return what action needs to be taken to produce up-to-date code for this // dex location. If "downgrade" is set to false, it verifies if the current // compiler filter is at least as good as an oat file generated with the @@ -187,33 +164,6 @@ class OatFileAssistant { // irrespective of the compiler filter of the up-to-date code. bool IsUpToDate(); - // Return code used when attempting to generate updated code. - enum ResultOfAttemptToUpdate { - kUpdateFailed, // We tried making the code up to date, but - // encountered an unexpected failure. - kUpdateNotAttempted, // We wanted to update the code, but determined we - // should not make the attempt. - kUpdateSucceeded // We successfully made the code up to date - // (possibly by doing nothing). - }; - - // Attempts to generate or relocate the oat file as needed to make it up to - // date based on the current runtime and compiler options. - // profile_changed should be true to indicate the profile has recently - // changed for this dex location. - // - // If the dex files need to be made up to date, class_loader_context will be - // passed to dex2oat. - // - // Returns the result of attempting to update the code. - // - // If the result is not kUpdateSucceeded, the value of error_msg will be set - // to a string describing why there was a failure or the update was not - // attempted. error_msg must not be null. - ResultOfAttemptToUpdate MakeUpToDate(bool profile_changed, - ClassLoaderContext* class_loader_context, - std::string* error_msg); - // Returns an oat file that can be used for loading dex files. // Returns null if no suitable oat file was found. // @@ -284,18 +234,6 @@ class OatFileAssistant { // Returns the status of the oat file for the dex location. OatStatus OatFileStatus(); - // Executes dex2oat using the current runtime configuration overridden with - // the given arguments. This does not check to see if dex2oat is enabled in - // the runtime configuration. - // Returns true on success. - // - // If there is a failure, the value of error_msg will be set to a string - // describing why there was failure. error_msg must not be null. - // - // TODO: The OatFileAssistant probably isn't the right place to have this - // function. - static bool Dex2Oat(const std::vector<std::string>& args, std::string* error_msg); - // Constructs the odex file name for the given dex location. // Returns true on success, in which case odex_filename is set to the odex // file name. @@ -436,20 +374,6 @@ class OatFileAssistant { bool file_released_ = false; }; - // Generate the oat file for the given info from the dex file using the - // current runtime compiler options, the specified filter and class loader - // context. - // This does not check the current status before attempting to generate the - // oat file. - // - // If the result is not kUpdateSucceeded, the value of error_msg will be set - // to a string describing why there was a failure or the update was not - // attempted. error_msg must not be null. - ResultOfAttemptToUpdate GenerateOatFileNoChecks(OatFileInfo& info, - CompilerFilter::Filter target, - const ClassLoaderContext* class_loader_context, - std::string* error_msg); - // Return info for the best oat file. OatFileInfo& GetBestInfo(); @@ -473,13 +397,6 @@ class OatFileAssistant { // location. OatStatus GivenOatFileStatus(const OatFile& file); - // Returns the current image location. - // Returns an empty string if the image location could not be retrieved. - // - // TODO: This method should belong with an image file manager, not - // the oat file assistant. - static std::string ImageLocation(); - // Gets the dex checksums required for an up-to-date oat file. // Returns cached_required_dex_checksums if the required checksums were // located. Returns null if the required checksums were not found. The |