blob: f48cdf343c98e3be71300c43ee3f8b8ab219191b [file] [log] [blame]
Richard Uhler66d874d2015-01-15 09:37:19 -08001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_RUNTIME_OAT_FILE_ASSISTANT_H_
18#define ART_RUNTIME_OAT_FILE_ASSISTANT_H_
19
20#include <cstdint>
21#include <memory>
Narayan Kamath8943c1d2016-05-02 13:14:48 +010022#include <sstream>
Richard Uhler66d874d2015-01-15 09:37:19 -080023#include <string>
24
25#include "arch/instruction_set.h"
26#include "base/scoped_flock.h"
27#include "base/unix_file/fd_file.h"
Andreas Gampe29d38e72016-03-23 15:31:51 +000028#include "compiler_filter.h"
Richard Uhler66d874d2015-01-15 09:37:19 -080029#include "oat_file.h"
30#include "os.h"
31#include "profiler.h"
32
33namespace art {
34
Mathieu Chartierfbc31082016-01-24 11:59:56 -080035namespace gc {
36namespace space {
37class ImageSpace;
38} // namespace space
39} // namespace gc
40
Richard Uhler66d874d2015-01-15 09:37:19 -080041// Class for assisting with oat file management.
42//
43// This class collects common utilities for determining the status of an oat
44// file on the device, updating the oat file, and loading the oat file.
45//
46// The oat file assistant is intended to be used with dex locations not on the
47// boot class path. See the IsInBootClassPath method for a way to check if the
48// dex location is in the boot class path.
Richard Uhler66d874d2015-01-15 09:37:19 -080049class OatFileAssistant {
50 public:
Richard Uhler95abd042015-03-24 09:51:28 -070051 enum DexOptNeeded {
52 // kNoDexOptNeeded - The code for this dex location is up to date and can
53 // be used as is.
54 // Matches Java: dalvik.system.DexFile.NO_DEXOPT_NEEDED = 0
55 kNoDexOptNeeded = 0,
Richard Uhler66d874d2015-01-15 09:37:19 -080056
Richard Uhler95abd042015-03-24 09:51:28 -070057 // kDex2OatNeeded - In order to make the code for this dex location up to
58 // date, dex2oat must be run on the dex file.
59 // Matches Java: dalvik.system.DexFile.DEX2OAT_NEEDED = 1
60 kDex2OatNeeded = 1,
Richard Uhler66d874d2015-01-15 09:37:19 -080061
Richard Uhler95abd042015-03-24 09:51:28 -070062 // kPatchOatNeeded - In order to make the code for this dex location up to
63 // date, patchoat must be run on the odex file.
64 // Matches Java: dalvik.system.DexFile.PATCHOAT_NEEDED = 2
65 kPatchOatNeeded = 2,
66
67 // kSelfPatchOatNeeded - In order to make the code for this dex location
68 // up to date, patchoat must be run on the oat file.
69 // Matches Java: dalvik.system.DexFile.SELF_PATCHOAT_NEEDED = 3
70 kSelfPatchOatNeeded = 3,
71 };
72
73 enum OatStatus {
74 // kOatOutOfDate - An oat file is said to be out of date if the file does
Calin Juravleb077e152016-02-18 18:47:37 +000075 // not exist, is out of date with respect to the dex file or boot image,
76 // or does not meet the target compilation type.
Richard Uhler95abd042015-03-24 09:51:28 -070077 kOatOutOfDate,
78
79 // kOatNeedsRelocation - An oat file is said to need relocation if the
80 // code is up to date, but not yet properly relocated for address space
81 // layout randomization (ASLR). In this case, the oat file is neither
82 // "out of date" nor "up to date".
83 kOatNeedsRelocation,
84
85 // kOatUpToDate - An oat file is said to be up to date if it is not out of
Richard Uhler66d874d2015-01-15 09:37:19 -080086 // date and has been properly relocated for the purposes of ASLR.
Richard Uhler95abd042015-03-24 09:51:28 -070087 kOatUpToDate,
Richard Uhler66d874d2015-01-15 09:37:19 -080088 };
89
90 // Constructs an OatFileAssistant object to assist the oat file
91 // corresponding to the given dex location with the target instruction set.
92 //
Mathieu Chartier2cebb242015-04-21 16:50:40 -070093 // The dex_location must not be null and should remain available and
Richard Uhler66d874d2015-01-15 09:37:19 -080094 // unchanged for the duration of the lifetime of the OatFileAssistant object.
95 // Typically the dex_location is the absolute path to the original,
96 // un-optimized dex file.
97 //
Richard Uhler66d874d2015-01-15 09:37:19 -080098 // Note: Currently the dex_location must have an extension.
99 // TODO: Relax this restriction?
100 //
101 // The isa should be either the 32 bit or 64 bit variant for the current
102 // device. For example, on an arm device, use arm or arm64. An oat file can
103 // be loaded executable only if the ISA matches the current runtime.
Andreas Gampe29d38e72016-03-23 15:31:51 +0000104 //
105 // profile_changed should be true if the profile has recently changed
106 // for this dex location.
107 //
108 // load_executable should be true if the caller intends to try and load
109 // executable code for this dex location.
Calin Juravleb077e152016-02-18 18:47:37 +0000110 OatFileAssistant(const char* dex_location,
Calin Juravleb077e152016-02-18 18:47:37 +0000111 const InstructionSet isa,
Andreas Gampe29d38e72016-03-23 15:31:51 +0000112 bool profile_changed,
Richard Uhler66d874d2015-01-15 09:37:19 -0800113 bool load_executable);
114
115 // Constructs an OatFileAssistant, providing an explicit target oat_location
116 // to use instead of the standard oat location.
Calin Juravleb077e152016-02-18 18:47:37 +0000117 OatFileAssistant(const char* dex_location,
118 const char* oat_location,
Calin Juravleb077e152016-02-18 18:47:37 +0000119 const InstructionSet isa,
Andreas Gampe29d38e72016-03-23 15:31:51 +0000120 bool profile_changed,
Calin Juravleb077e152016-02-18 18:47:37 +0000121 bool load_executable);
Richard Uhler66d874d2015-01-15 09:37:19 -0800122
123 ~OatFileAssistant();
124
125 // Returns true if the dex location refers to an element of the boot class
126 // path.
127 bool IsInBootClassPath();
128
129 // Obtains a lock on the target oat file.
130 // Only one OatFileAssistant object can hold the lock for a target oat file
131 // at a time. The Lock is released automatically when the OatFileAssistant
132 // object goes out of scope. The Lock() method must not be called if the
133 // lock has already been acquired.
134 //
135 // Returns true on success.
136 // Returns false on error, in which case error_msg will contain more
137 // information on the error.
138 //
139 // The 'error_msg' argument must not be null.
140 //
141 // This is intended to be used to avoid race conditions when multiple
142 // processes generate oat files, such as when a foreground Activity and
143 // a background Service both use DexClassLoaders pointing to the same dex
144 // file.
145 bool Lock(std::string* error_msg);
146
Richard Uhler95abd042015-03-24 09:51:28 -0700147 // Return what action needs to be taken to produce up-to-date code for this
Andreas Gampe29d38e72016-03-23 15:31:51 +0000148 // dex location that is at least as good as an oat file generated with the
149 // given compiler filter.
150 DexOptNeeded GetDexOptNeeded(CompilerFilter::Filter target_compiler_filter);
Richard Uhler66d874d2015-01-15 09:37:19 -0800151
Richard Uhler1e860612016-03-30 12:17:55 -0700152 // Return code used when attempting to generate updated code.
153 enum ResultOfAttemptToUpdate {
154 kUpdateFailed, // We tried making the code up to date, but
155 // encountered an unexpected failure.
156 kUpdateNotAttempted, // We wanted to update the code, but determined we
157 // should not make the attempt.
158 kUpdateSucceeded // We successfully made the code up to date
159 // (possibly by doing nothing).
160 };
161
Richard Uhler66d874d2015-01-15 09:37:19 -0800162 // Attempts to generate or relocate the oat file as needed to make it up to
Richard Uhlerf4b34872016-04-13 11:03:46 -0700163 // date based on the current runtime and compiler options.
Richard Uhler66d874d2015-01-15 09:37:19 -0800164 //
Richard Uhler1e860612016-03-30 12:17:55 -0700165 // If the result is not kUpdateSucceeded, the value of error_msg will be set
166 // to a string describing why there was a failure or the update was not
167 // attempted. error_msg must not be null.
Richard Uhlerf4b34872016-04-13 11:03:46 -0700168 ResultOfAttemptToUpdate MakeUpToDate(std::string* error_msg);
Richard Uhler66d874d2015-01-15 09:37:19 -0800169
170 // Returns an oat file that can be used for loading dex files.
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700171 // Returns null if no suitable oat file was found.
Richard Uhler66d874d2015-01-15 09:37:19 -0800172 //
173 // After this call, no other methods of the OatFileAssistant should be
174 // called, because access to the loaded oat file has been taken away from
175 // the OatFileAssistant object.
176 std::unique_ptr<OatFile> GetBestOatFile();
177
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800178 // Open and returns an image space associated with the oat file.
179 gc::space::ImageSpace* OpenImageSpace(const OatFile* oat_file);
180
Richard Uhler66d874d2015-01-15 09:37:19 -0800181 // Loads the dex files in the given oat file for the given dex location.
182 // The oat file should be up to date for the given dex location.
183 // This loads multiple dex files in the case of multidex.
184 // Returns an empty vector if no dex files for that location could be loaded
185 // from the oat file.
186 //
187 // The caller is responsible for freeing the dex_files returned, if any. The
188 // dex_files will only remain valid as long as the oat_file is valid.
189 static std::vector<std::unique_ptr<const DexFile>> LoadDexFiles(
190 const OatFile& oat_file, const char* dex_location);
191
Richard Uhler9b994ea2015-06-24 08:44:19 -0700192 // Returns true if there are dex files in the original dex location that can
193 // be compiled with dex2oat for this dex location.
194 // Returns false if there is no original dex file, or if the original dex
195 // file is an apk/zip without a classes.dex entry.
196 bool HasOriginalDexFiles();
197
Richard Uhler63434112015-03-16 14:32:16 -0700198 // If the dex file has been installed with a compiled oat file alongside
199 // it, the compiled oat file will have the extension .odex, and is referred
200 // to as the odex file. It is called odex for legacy reasons; the file is
201 // really an oat file. The odex file will often, but not always, have a
202 // patch delta of 0 and need to be relocated before use for the purposes of
203 // ASLR. The odex file is treated as if it were read-only.
Richard Uhler66d874d2015-01-15 09:37:19 -0800204 // These methods return the location and status of the odex file for the dex
205 // location.
206 // Notes:
207 // * OdexFileName may return null if the odex file name could not be
208 // determined.
209 const std::string* OdexFileName();
210 bool OdexFileExists();
Richard Uhler95abd042015-03-24 09:51:28 -0700211 OatStatus OdexFileStatus();
Richard Uhler66d874d2015-01-15 09:37:19 -0800212 bool OdexFileIsOutOfDate();
213 bool OdexFileNeedsRelocation();
214 bool OdexFileIsUpToDate();
Narayan Kamath8943c1d2016-05-02 13:14:48 +0100215 // Must only be called if the associated odex file exists, i.e, if
216 // |OdexFileExists() == true|.
217 CompilerFilter::Filter OdexFileCompilerFilter();
Richard Uhler66d874d2015-01-15 09:37:19 -0800218
219 // When the dex files is compiled on the target device, the oat file is the
220 // result. The oat file will have been relocated to some
221 // (possibly-out-of-date) offset for ASLR.
222 // These methods return the location and status of the target oat file for
223 // the dex location.
224 //
225 // Notes:
Richard Uhler66d874d2015-01-15 09:37:19 -0800226 // * OatFileName may return null if the oat file name could not be
227 // determined.
228 const std::string* OatFileName();
229 bool OatFileExists();
Richard Uhler95abd042015-03-24 09:51:28 -0700230 OatStatus OatFileStatus();
Richard Uhler66d874d2015-01-15 09:37:19 -0800231 bool OatFileIsOutOfDate();
232 bool OatFileNeedsRelocation();
233 bool OatFileIsUpToDate();
Narayan Kamath8943c1d2016-05-02 13:14:48 +0100234 // Must only be called if the associated oat file exists, i.e, if
235 // |OatFileExists() == true|.
236 CompilerFilter::Filter OatFileCompilerFilter();
Richard Uhler66d874d2015-01-15 09:37:19 -0800237
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800238 // Return image file name. Does not cache since it relies on the oat file.
239 std::string ArtFileName(const OatFile* oat_file) const;
240
Richard Uhler66d874d2015-01-15 09:37:19 -0800241 // These methods return the status for a given opened oat file with respect
242 // to the dex location.
Richard Uhler95abd042015-03-24 09:51:28 -0700243 OatStatus GivenOatFileStatus(const OatFile& file);
Richard Uhler66d874d2015-01-15 09:37:19 -0800244 bool GivenOatFileIsOutOfDate(const OatFile& file);
245 bool GivenOatFileNeedsRelocation(const OatFile& file);
246 bool GivenOatFileIsUpToDate(const OatFile& file);
247
Richard Uhler95abd042015-03-24 09:51:28 -0700248 // Generates the oat file by relocation from the named input file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800249 // This does not check the current status before attempting to relocate the
250 // oat file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800251 //
Richard Uhler1e860612016-03-30 12:17:55 -0700252 // If the result is not kUpdateSucceeded, the value of error_msg will be set
253 // to a string describing why there was a failure or the update was not
254 // attempted. error_msg must not be null.
255 ResultOfAttemptToUpdate RelocateOatFile(const std::string* input_file, std::string* error_msg);
Richard Uhler66d874d2015-01-15 09:37:19 -0800256
Richard Uhlerf4b34872016-04-13 11:03:46 -0700257 // Generate the oat file from the dex file using the current runtime
258 // compiler options.
Richard Uhler66d874d2015-01-15 09:37:19 -0800259 // This does not check the current status before attempting to generate the
260 // oat file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800261 //
Richard Uhler1e860612016-03-30 12:17:55 -0700262 // If the result is not kUpdateSucceeded, the value of error_msg will be set
263 // to a string describing why there was a failure or the update was not
264 // attempted. error_msg must not be null.
Richard Uhlerf4b34872016-04-13 11:03:46 -0700265 ResultOfAttemptToUpdate GenerateOatFile(std::string* error_msg);
Richard Uhler66d874d2015-01-15 09:37:19 -0800266
267 // Executes dex2oat using the current runtime configuration overridden with
268 // the given arguments. This does not check to see if dex2oat is enabled in
269 // the runtime configuration.
270 // Returns true on success.
271 //
272 // If there is a failure, the value of error_msg will be set to a string
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700273 // describing why there was failure. error_msg must not be null.
Richard Uhler66d874d2015-01-15 09:37:19 -0800274 //
275 // TODO: The OatFileAssistant probably isn't the right place to have this
276 // function.
277 static bool Dex2Oat(const std::vector<std::string>& args, std::string* error_msg);
278
279 // Constructs the odex file name for the given dex location.
280 // Returns true on success, in which case odex_filename is set to the odex
281 // file name.
282 // Returns false on error, in which case error_msg describes the error.
283 // Neither odex_filename nor error_msg may be null.
284 static bool DexFilenameToOdexFilename(const std::string& location,
285 InstructionSet isa, std::string* odex_filename, std::string* error_msg);
286
Jeff Haofd336c32016-04-07 19:46:31 -0700287 static uint32_t CalculateCombinedImageChecksum(InstructionSet isa = kRuntimeISA);
Jeff Haob11ffb72016-04-07 15:40:54 -0700288
Richard Uhler66d874d2015-01-15 09:37:19 -0800289 private:
290 struct ImageInfo {
291 uint32_t oat_checksum = 0;
292 uintptr_t oat_data_begin = 0;
293 int32_t patch_delta = 0;
294 std::string location;
295 };
296
297 // Returns the path to the dalvik cache directory.
298 // Does not check existence of the cache or try to create it.
299 // Includes the trailing slash.
300 // Returns an empty string if we can't get the dalvik cache directory path.
301 std::string DalvikCacheDirectory();
302
Richard Uhler66d874d2015-01-15 09:37:19 -0800303 // Returns the current image location.
304 // Returns an empty string if the image location could not be retrieved.
305 //
306 // TODO: This method should belong with an image file manager, not
307 // the oat file assistant.
308 static std::string ImageLocation();
309
310 // Gets the dex checksum required for an up-to-date oat file.
311 // Returns dex_checksum if a required checksum was located. Returns
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700312 // null if the required checksum was not found.
Richard Uhler66d874d2015-01-15 09:37:19 -0800313 // The caller shouldn't clean up or free the returned pointer.
Richard Uhler9b994ea2015-06-24 08:44:19 -0700314 // This sets the has_original_dex_files_ field to true if a checksum was
315 // found for the dex_location_ dex file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800316 const uint32_t* GetRequiredDexChecksum();
317
318 // Returns the loaded odex file.
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700319 // Loads the file if needed. Returns null if the file failed to load.
Richard Uhler66d874d2015-01-15 09:37:19 -0800320 // The caller shouldn't clean up or free the returned pointer.
321 const OatFile* GetOdexFile();
322
Andreas Gampe29d38e72016-03-23 15:31:51 +0000323 // Returns true if the compiler filter used to generate the odex file is at
324 // least as good as the given target filter.
325 bool OdexFileCompilerFilterIsOkay(CompilerFilter::Filter target);
326
Richard Uhler5f946da2015-07-17 12:28:32 -0700327 // Returns true if the odex file is opened executable.
328 bool OdexFileIsExecutable();
329
Richard Uhlerd1537b52016-03-29 13:27:41 -0700330 // Returns true if the odex file has patch info required to run patchoat.
331 bool OdexFileHasPatchInfo();
332
Richard Uhler66d874d2015-01-15 09:37:19 -0800333 // Clear any cached information about the odex file that depends on the
334 // contents of the file.
335 void ClearOdexFileCache();
336
337 // Returns the loaded oat file.
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700338 // Loads the file if needed. Returns null if the file failed to load.
Richard Uhler66d874d2015-01-15 09:37:19 -0800339 // The caller shouldn't clean up or free the returned pointer.
340 const OatFile* GetOatFile();
341
Andreas Gampe29d38e72016-03-23 15:31:51 +0000342 // Returns true if the compiler filter used to generate the oat file is at
343 // least as good as the given target filter.
344 bool OatFileCompilerFilterIsOkay(CompilerFilter::Filter target);
345
Richard Uhler5f946da2015-07-17 12:28:32 -0700346 // Returns true if the oat file is opened executable.
347 bool OatFileIsExecutable();
348
Richard Uhlerd1537b52016-03-29 13:27:41 -0700349 // Returns true if the oat file has patch info required to run patchoat.
350 bool OatFileHasPatchInfo();
351
Richard Uhler66d874d2015-01-15 09:37:19 -0800352 // Clear any cached information about the oat file that depends on the
353 // contents of the file.
354 void ClearOatFileCache();
355
356 // Returns the loaded image info.
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700357 // Loads the image info if needed. Returns null if the image info failed
Richard Uhler66d874d2015-01-15 09:37:19 -0800358 // to load.
359 // The caller shouldn't clean up or free the returned pointer.
360 const ImageInfo* GetImageInfo();
361
Jeff Haob11ffb72016-04-07 15:40:54 -0700362 uint32_t GetCombinedImageChecksum();
363
Richard Uhler66d874d2015-01-15 09:37:19 -0800364 // To implement Lock(), we lock a dummy file where the oat file would go
365 // (adding ".flock" to the target file name) and retain the lock for the
366 // remaining lifetime of the OatFileAssistant object.
Richard Uhler66d874d2015-01-15 09:37:19 -0800367 ScopedFlock flock_;
368
Richard Uhler740eec92015-10-15 15:12:23 -0700369 std::string dex_location_;
Richard Uhler66d874d2015-01-15 09:37:19 -0800370
371 // In a properly constructed OatFileAssistant object, isa_ should be either
372 // the 32 or 64 bit variant for the current device.
373 const InstructionSet isa_ = kNone;
374
Andreas Gampe29d38e72016-03-23 15:31:51 +0000375 // Whether the profile has recently changed.
376 bool profile_changed_ = false;
377
Richard Uhler66d874d2015-01-15 09:37:19 -0800378 // Whether we will attempt to load oat files executable.
379 bool load_executable_ = false;
380
381 // Cached value of the required dex checksum.
382 // This should be accessed only by the GetRequiredDexChecksum() method.
Richard Uhler9b994ea2015-06-24 08:44:19 -0700383 uint32_t cached_required_dex_checksum_;
384 bool required_dex_checksum_attempted_ = false;
385 bool required_dex_checksum_found_;
386 bool has_original_dex_files_;
Richard Uhler66d874d2015-01-15 09:37:19 -0800387
388 // Cached value of the odex file name.
389 // This should be accessed only by the OdexFileName() method.
390 bool cached_odex_file_name_attempted_ = false;
391 bool cached_odex_file_name_found_;
392 std::string cached_odex_file_name_;
393
394 // Cached value of the loaded odex file.
395 // Use the GetOdexFile method rather than accessing this directly, unless you
396 // know the odex file isn't out of date.
397 bool odex_file_load_attempted_ = false;
398 std::unique_ptr<OatFile> cached_odex_file_;
399
400 // Cached results for OdexFileIsOutOfDate
401 bool odex_file_is_out_of_date_attempted_ = false;
402 bool cached_odex_file_is_out_of_date_;
403
404 // Cached results for OdexFileIsUpToDate
405 bool odex_file_is_up_to_date_attempted_ = false;
406 bool cached_odex_file_is_up_to_date_;
407
408 // Cached value of the oat file name.
409 // This should be accessed only by the OatFileName() method.
410 bool cached_oat_file_name_attempted_ = false;
411 bool cached_oat_file_name_found_;
412 std::string cached_oat_file_name_;
413
Richard Uhlerb361d942015-05-07 10:52:28 -0700414 // Cached value of the loaded oat file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800415 // Use the GetOatFile method rather than accessing this directly, unless you
Richard Uhlerb361d942015-05-07 10:52:28 -0700416 // know the oat file isn't out of date.
Richard Uhler66d874d2015-01-15 09:37:19 -0800417 bool oat_file_load_attempted_ = false;
418 std::unique_ptr<OatFile> cached_oat_file_;
419
420 // Cached results for OatFileIsOutOfDate
421 bool oat_file_is_out_of_date_attempted_ = false;
422 bool cached_oat_file_is_out_of_date_;
423
424 // Cached results for OatFileIsUpToDate
425 bool oat_file_is_up_to_date_attempted_ = false;
426 bool cached_oat_file_is_up_to_date_;
427
428 // Cached value of the image info.
429 // Use the GetImageInfo method rather than accessing these directly.
430 // TODO: The image info should probably be moved out of the oat file
431 // assistant to an image file manager.
432 bool image_info_load_attempted_ = false;
433 bool image_info_load_succeeded_ = false;
434 ImageInfo cached_image_info_;
Jeff Haob11ffb72016-04-07 15:40:54 -0700435 uint32_t combined_image_checksum_ = 0;
Richard Uhler66d874d2015-01-15 09:37:19 -0800436
Richard Uhler66d874d2015-01-15 09:37:19 -0800437 // For debugging only.
438 // If this flag is set, the oat or odex file has been released to the user
439 // of the OatFileAssistant object and the OatFileAssistant object is in a
440 // bad state and should no longer be used.
441 bool oat_file_released_ = false;
442
443 DISALLOW_COPY_AND_ASSIGN(OatFileAssistant);
444};
445
Narayan Kamath8943c1d2016-05-02 13:14:48 +0100446std::ostream& operator << (std::ostream& stream, const OatFileAssistant::OatStatus status);
447
Richard Uhler66d874d2015-01-15 09:37:19 -0800448} // namespace art
449
450#endif // ART_RUNTIME_OAT_FILE_ASSISTANT_H_