blob: 3a838d7275bd0fe86170e7bcf46c776ba86dea5b [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"
Richard Uhler66d874d2015-01-15 09:37:19 -080031
32namespace art {
33
Mathieu Chartierfbc31082016-01-24 11:59:56 -080034namespace gc {
35namespace space {
36class ImageSpace;
37} // namespace space
38} // namespace gc
39
Richard Uhler66d874d2015-01-15 09:37:19 -080040// Class for assisting with oat file management.
41//
42// This class collects common utilities for determining the status of an oat
43// file on the device, updating the oat file, and loading the oat file.
44//
45// The oat file assistant is intended to be used with dex locations not on the
46// boot class path. See the IsInBootClassPath method for a way to check if the
47// dex location is in the boot class path.
Richard Uhler66d874d2015-01-15 09:37:19 -080048class OatFileAssistant {
49 public:
Richard Uhler95abd042015-03-24 09:51:28 -070050 enum DexOptNeeded {
51 // kNoDexOptNeeded - The code for this dex location is up to date and can
52 // be used as is.
53 // Matches Java: dalvik.system.DexFile.NO_DEXOPT_NEEDED = 0
54 kNoDexOptNeeded = 0,
Richard Uhler66d874d2015-01-15 09:37:19 -080055
Richard Uhler95abd042015-03-24 09:51:28 -070056 // kDex2OatNeeded - In order to make the code for this dex location up to
57 // date, dex2oat must be run on the dex file.
58 // Matches Java: dalvik.system.DexFile.DEX2OAT_NEEDED = 1
59 kDex2OatNeeded = 1,
Richard Uhler66d874d2015-01-15 09:37:19 -080060
Richard Uhler95abd042015-03-24 09:51:28 -070061 // kPatchOatNeeded - In order to make the code for this dex location up to
62 // date, patchoat must be run on the odex file.
63 // Matches Java: dalvik.system.DexFile.PATCHOAT_NEEDED = 2
64 kPatchOatNeeded = 2,
65
66 // kSelfPatchOatNeeded - In order to make the code for this dex location
67 // up to date, patchoat must be run on the oat file.
68 // Matches Java: dalvik.system.DexFile.SELF_PATCHOAT_NEEDED = 3
69 kSelfPatchOatNeeded = 3,
70 };
71
72 enum OatStatus {
Richard Uhler03bc6592016-11-22 09:42:04 +000073 // kOatCannotOpen - The oat file cannot be opened, because it does not
74 // exist, is unreadable, or otherwise corrupted.
75 kOatCannotOpen,
Richard Uhler95abd042015-03-24 09:51:28 -070076
Richard Uhler03bc6592016-11-22 09:42:04 +000077 // kOatDexOutOfDate - The oat file is out of date with respect to the dex file.
78 kOatDexOutOfDate,
Richard Uhler95abd042015-03-24 09:51:28 -070079
Richard Uhler03bc6592016-11-22 09:42:04 +000080 // kOatBootImageOutOfDate - The oat file is up to date with respect to the
81 // dex file, but is out of date with respect to the boot image.
82 kOatBootImageOutOfDate,
83
84 // kOatRelocationOutOfDate - The oat file is up to date with respect to
85 // the dex file and boot image, but contains compiled code that has the
86 // wrong patch delta with respect to the boot image. Patchoat should be
87 // run on the oat file to update the patch delta of the compiled code to
88 // match the boot image.
89 kOatRelocationOutOfDate,
90
91 // kOatUpToDate - The oat file is completely up to date with respect to
92 // the dex file and boot image.
Richard Uhler95abd042015-03-24 09:51:28 -070093 kOatUpToDate,
Richard Uhler66d874d2015-01-15 09:37:19 -080094 };
95
96 // Constructs an OatFileAssistant object to assist the oat file
97 // corresponding to the given dex location with the target instruction set.
98 //
Mathieu Chartier2cebb242015-04-21 16:50:40 -070099 // The dex_location must not be null and should remain available and
Richard Uhler66d874d2015-01-15 09:37:19 -0800100 // unchanged for the duration of the lifetime of the OatFileAssistant object.
101 // Typically the dex_location is the absolute path to the original,
102 // un-optimized dex file.
103 //
Richard Uhler66d874d2015-01-15 09:37:19 -0800104 // Note: Currently the dex_location must have an extension.
105 // TODO: Relax this restriction?
106 //
107 // The isa should be either the 32 bit or 64 bit variant for the current
108 // device. For example, on an arm device, use arm or arm64. An oat file can
109 // be loaded executable only if the ISA matches the current runtime.
Andreas Gampe29d38e72016-03-23 15:31:51 +0000110 //
Andreas Gampe29d38e72016-03-23 15:31:51 +0000111 // load_executable should be true if the caller intends to try and load
112 // executable code for this dex location.
Calin Juravleb077e152016-02-18 18:47:37 +0000113 OatFileAssistant(const char* dex_location,
Calin Juravleb077e152016-02-18 18:47:37 +0000114 const InstructionSet isa,
Richard Uhler66d874d2015-01-15 09:37:19 -0800115 bool load_executable);
116
117 // Constructs an OatFileAssistant, providing an explicit target oat_location
118 // to use instead of the standard oat location.
Calin Juravleb077e152016-02-18 18:47:37 +0000119 OatFileAssistant(const char* dex_location,
120 const char* oat_location,
Calin Juravleb077e152016-02-18 18:47:37 +0000121 const InstructionSet isa,
122 bool load_executable);
Richard Uhler66d874d2015-01-15 09:37:19 -0800123
124 ~OatFileAssistant();
125
126 // Returns true if the dex location refers to an element of the boot class
127 // path.
128 bool IsInBootClassPath();
129
130 // Obtains a lock on the target oat file.
131 // Only one OatFileAssistant object can hold the lock for a target oat file
132 // at a time. The Lock is released automatically when the OatFileAssistant
133 // object goes out of scope. The Lock() method must not be called if the
134 // lock has already been acquired.
135 //
136 // Returns true on success.
137 // Returns false on error, in which case error_msg will contain more
138 // information on the error.
139 //
140 // The 'error_msg' argument must not be null.
141 //
142 // This is intended to be used to avoid race conditions when multiple
143 // processes generate oat files, such as when a foreground Activity and
144 // a background Service both use DexClassLoaders pointing to the same dex
145 // file.
146 bool Lock(std::string* error_msg);
147
Richard Uhler95abd042015-03-24 09:51:28 -0700148 // Return what action needs to be taken to produce up-to-date code for this
Andreas Gampe29d38e72016-03-23 15:31:51 +0000149 // dex location that is at least as good as an oat file generated with the
Richard Uhlerd1472a22016-04-15 15:18:56 -0700150 // given compiler filter. profile_changed should be true to indicate the
151 // profile has recently changed for this dex location.
152 DexOptNeeded GetDexOptNeeded(CompilerFilter::Filter target_compiler_filter,
153 bool profile_changed = false);
Richard Uhler66d874d2015-01-15 09:37:19 -0800154
Richard Uhler01be6812016-05-17 10:34:52 -0700155 // Returns true if there is up-to-date code for this dex location,
156 // irrespective of the compiler filter of the up-to-date code.
157 bool IsUpToDate();
158
Richard Uhler1e860612016-03-30 12:17:55 -0700159 // Return code used when attempting to generate updated code.
160 enum ResultOfAttemptToUpdate {
161 kUpdateFailed, // We tried making the code up to date, but
162 // encountered an unexpected failure.
163 kUpdateNotAttempted, // We wanted to update the code, but determined we
164 // should not make the attempt.
165 kUpdateSucceeded // We successfully made the code up to date
166 // (possibly by doing nothing).
167 };
168
Richard Uhler66d874d2015-01-15 09:37:19 -0800169 // Attempts to generate or relocate the oat file as needed to make it up to
Richard Uhlerf4b34872016-04-13 11:03:46 -0700170 // date based on the current runtime and compiler options.
Richard Uhlerd1472a22016-04-15 15:18:56 -0700171 // profile_changed should be true to indicate the profile has recently
172 // changed for this dex location.
173 //
174 // Returns the result of attempting to update the code.
Richard Uhler66d874d2015-01-15 09:37:19 -0800175 //
Richard Uhler1e860612016-03-30 12:17:55 -0700176 // If the result is not kUpdateSucceeded, the value of error_msg will be set
177 // to a string describing why there was a failure or the update was not
178 // attempted. error_msg must not be null.
Richard Uhlerd1472a22016-04-15 15:18:56 -0700179 ResultOfAttemptToUpdate MakeUpToDate(bool profile_changed, std::string* error_msg);
Richard Uhler66d874d2015-01-15 09:37:19 -0800180
181 // Returns an oat file that can be used for loading dex files.
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700182 // Returns null if no suitable oat file was found.
Richard Uhler66d874d2015-01-15 09:37:19 -0800183 //
184 // After this call, no other methods of the OatFileAssistant should be
185 // called, because access to the loaded oat file has been taken away from
186 // the OatFileAssistant object.
187 std::unique_ptr<OatFile> GetBestOatFile();
188
Richard Uhler46cc64f2016-11-14 14:53:55 +0000189 // Returns a human readable description of the status of the code for the
190 // dex file. The returned description is for debugging purposes only.
191 std::string GetStatusDump();
192
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800193 // Open and returns an image space associated with the oat file.
Andreas Gampea463b6a2016-08-12 21:53:32 -0700194 static std::unique_ptr<gc::space::ImageSpace> OpenImageSpace(const OatFile* oat_file);
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800195
Richard Uhler66d874d2015-01-15 09:37:19 -0800196 // Loads the dex files in the given oat file for the given dex location.
197 // The oat file should be up to date for the given dex location.
198 // This loads multiple dex files in the case of multidex.
199 // Returns an empty vector if no dex files for that location could be loaded
200 // from the oat file.
201 //
202 // The caller is responsible for freeing the dex_files returned, if any. The
203 // dex_files will only remain valid as long as the oat_file is valid.
204 static std::vector<std::unique_ptr<const DexFile>> LoadDexFiles(
205 const OatFile& oat_file, const char* dex_location);
206
Richard Uhler9b994ea2015-06-24 08:44:19 -0700207 // Returns true if there are dex files in the original dex location that can
208 // be compiled with dex2oat for this dex location.
209 // Returns false if there is no original dex file, or if the original dex
210 // file is an apk/zip without a classes.dex entry.
211 bool HasOriginalDexFiles();
212
Richard Uhler63434112015-03-16 14:32:16 -0700213 // If the dex file has been installed with a compiled oat file alongside
214 // it, the compiled oat file will have the extension .odex, and is referred
215 // to as the odex file. It is called odex for legacy reasons; the file is
216 // really an oat file. The odex file will often, but not always, have a
217 // patch delta of 0 and need to be relocated before use for the purposes of
218 // ASLR. The odex file is treated as if it were read-only.
Richard Uhler03bc6592016-11-22 09:42:04 +0000219 //
220 // Returns the status of the odex file for the dex location.
Richard Uhler95abd042015-03-24 09:51:28 -0700221 OatStatus OdexFileStatus();
Richard Uhler66d874d2015-01-15 09:37:19 -0800222
223 // When the dex files is compiled on the target device, the oat file is the
224 // result. The oat file will have been relocated to some
225 // (possibly-out-of-date) offset for ASLR.
Richard Uhler03bc6592016-11-22 09:42:04 +0000226 //
227 // Returns the status of the oat file for the dex location.
Richard Uhler95abd042015-03-24 09:51:28 -0700228 OatStatus OatFileStatus();
Richard Uhler66d874d2015-01-15 09:37:19 -0800229
Richard Uhler95abd042015-03-24 09:51:28 -0700230 // Generates the oat file by relocation from the named input file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800231 // This does not check the current status before attempting to relocate the
232 // oat file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800233 //
Richard Uhler1e860612016-03-30 12:17:55 -0700234 // If the result is not kUpdateSucceeded, the value of error_msg will be set
235 // to a string describing why there was a failure or the update was not
236 // attempted. error_msg must not be null.
237 ResultOfAttemptToUpdate RelocateOatFile(const std::string* input_file, std::string* error_msg);
Richard Uhler66d874d2015-01-15 09:37:19 -0800238
Richard Uhlerf4b34872016-04-13 11:03:46 -0700239 // Generate the oat file from the dex file using the current runtime
240 // compiler options.
Richard Uhler66d874d2015-01-15 09:37:19 -0800241 // This does not check the current status before attempting to generate the
242 // oat file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800243 //
Richard Uhler1e860612016-03-30 12:17:55 -0700244 // If the result is not kUpdateSucceeded, the value of error_msg will be set
245 // to a string describing why there was a failure or the update was not
246 // attempted. error_msg must not be null.
Richard Uhlerf4b34872016-04-13 11:03:46 -0700247 ResultOfAttemptToUpdate GenerateOatFile(std::string* error_msg);
Richard Uhler66d874d2015-01-15 09:37:19 -0800248
249 // Executes dex2oat using the current runtime configuration overridden with
250 // the given arguments. This does not check to see if dex2oat is enabled in
251 // the runtime configuration.
252 // Returns true on success.
253 //
254 // If there is a failure, the value of error_msg will be set to a string
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700255 // describing why there was failure. error_msg must not be null.
Richard Uhler66d874d2015-01-15 09:37:19 -0800256 //
257 // TODO: The OatFileAssistant probably isn't the right place to have this
258 // function.
259 static bool Dex2Oat(const std::vector<std::string>& args, std::string* error_msg);
260
261 // Constructs the odex file name for the given dex location.
262 // Returns true on success, in which case odex_filename is set to the odex
263 // file name.
Richard Uhlere8e48ae2016-04-19 12:41:04 -0700264 // Returns false on error, in which case error_msg describes the error and
265 // odex_filename is not changed.
Richard Uhler66d874d2015-01-15 09:37:19 -0800266 // Neither odex_filename nor error_msg may be null.
Richard Uhlerb81881d2016-04-19 13:08:04 -0700267 static bool DexLocationToOdexFilename(const std::string& location,
268 InstructionSet isa,
269 std::string* odex_filename,
270 std::string* error_msg);
271
272 // Constructs the oat file name for the given dex location.
273 // Returns true on success, in which case oat_filename is set to the oat
274 // file name.
275 // Returns false on error, in which case error_msg describes the error and
276 // oat_filename is not changed.
277 // Neither oat_filename nor error_msg may be null.
278 static bool DexLocationToOatFilename(const std::string& location,
279 InstructionSet isa,
280 std::string* oat_filename,
281 std::string* error_msg);
Richard Uhler66d874d2015-01-15 09:37:19 -0800282
Jeff Haofd336c32016-04-07 19:46:31 -0700283 static uint32_t CalculateCombinedImageChecksum(InstructionSet isa = kRuntimeISA);
Jeff Haob11ffb72016-04-07 15:40:54 -0700284
Richard Uhler66d874d2015-01-15 09:37:19 -0800285 private:
286 struct ImageInfo {
287 uint32_t oat_checksum = 0;
288 uintptr_t oat_data_begin = 0;
289 int32_t patch_delta = 0;
290 std::string location;
291 };
292
Richard Uhler743bf362016-04-19 15:39:37 -0700293 class OatFileInfo {
294 public:
295 // Initially the info is for no file in particular. It will treat the
296 // file as out of date until Reset is called with a real filename to use
297 // the cache for.
Richard Uhler88bc6732016-11-14 14:38:03 +0000298 // Pass true for is_oat_location if the information associated with this
299 // OatFileInfo is for the oat location, as opposed to the odex location.
300 OatFileInfo(OatFileAssistant* oat_file_assistant, bool is_oat_location);
301
302 bool IsOatLocation();
Richard Uhler743bf362016-04-19 15:39:37 -0700303
304 const std::string* Filename();
Richard Uhler03bc6592016-11-22 09:42:04 +0000305
306 // Returns true if this oat file can be used for running code. The oat
307 // file can be used for running code as long as it is not out of date with
308 // respect to the dex code or boot image. An oat file that is out of date
309 // with respect to relocation is considered useable, because it's possible
310 // to interpret the dex code rather than run the unrelocated compiled
311 // code.
312 bool IsUseable();
313
314 // Returns the status of this oat file.
Richard Uhler743bf362016-04-19 15:39:37 -0700315 OatStatus Status();
Richard Uhler743bf362016-04-19 15:39:37 -0700316
Richard Uhler70a84262016-11-08 16:51:51 +0000317 // Return the DexOptNeeded value for this oat file with respect to the
318 // given target_compilation_filter.
319 // profile_changed should be true to indicate the profile has recently
320 // changed for this dex location.
321 // If patchoat is needed, this function will return the kPatchOatNeeded
322 // status, not the kSelfPatchOatNeeded status.
323 DexOptNeeded GetDexOptNeeded(CompilerFilter::Filter target_compiler_filter,
324 bool profile_changed);
325
Richard Uhler743bf362016-04-19 15:39:37 -0700326 // Returns the loaded file.
327 // Loads the file if needed. Returns null if the file failed to load.
328 // The caller shouldn't clean up or free the returned pointer.
329 const OatFile* GetFile();
330
Richard Uhler743bf362016-04-19 15:39:37 -0700331 // Returns true if the file is opened executable.
332 bool IsExecutable();
333
334 // Returns true if the file has patch info required to run patchoat.
335 bool HasPatchInfo();
336
337 // Clear any cached information about the file that depends on the
338 // contents of the file. This does not reset the provided filename.
339 void Reset();
340
341 // Clear any cached information and switch to getting info about the oat
342 // file with the given filename.
343 void Reset(const std::string& filename);
344
Richard Uhler70a84262016-11-08 16:51:51 +0000345 // Release the loaded oat file for runtime use.
346 // Returns null if the oat file hasn't been loaded or is out of date.
347 // Ensures the returned file is not loaded executable if it has unuseable
348 // compiled code.
349 //
350 // After this call, no other methods of the OatFileInfo should be
351 // called, because access to the loaded oat file has been taken away from
352 // the OatFileInfo object.
353 std::unique_ptr<OatFile> ReleaseFileForUse();
354
355 private:
356 // Returns true if the compiler filter used to generate the file is at
357 // least as good as the given target filter. profile_changed should be
358 // true to indicate the profile has recently changed for this dex
359 // location.
360 bool CompilerFilterIsOkay(CompilerFilter::Filter target, bool profile_changed);
361
Richard Uhler743bf362016-04-19 15:39:37 -0700362 // Release the loaded oat file.
363 // Returns null if the oat file hasn't been loaded.
364 //
365 // After this call, no other methods of the OatFileInfo should be
366 // called, because access to the loaded oat file has been taken away from
367 // the OatFileInfo object.
368 std::unique_ptr<OatFile> ReleaseFile();
369
Richard Uhler743bf362016-04-19 15:39:37 -0700370 OatFileAssistant* oat_file_assistant_;
Richard Uhler88bc6732016-11-14 14:38:03 +0000371 const bool is_oat_location_;
Richard Uhler743bf362016-04-19 15:39:37 -0700372
373 bool filename_provided_ = false;
374 std::string filename_;
375
376 bool load_attempted_ = false;
377 std::unique_ptr<OatFile> file_;
378
379 bool status_attempted_ = false;
380 OatStatus status_;
381
382 // For debugging only.
383 // If this flag is set, the file has been released to the user and the
384 // OatFileInfo object is in a bad state and should no longer be used.
385 bool file_released_ = false;
386 };
Richard Uhler66d874d2015-01-15 09:37:19 -0800387
Richard Uhler88bc6732016-11-14 14:38:03 +0000388 // Return info for the best oat file.
389 OatFileInfo& GetBestInfo();
390
Richard Uhler03bc6592016-11-22 09:42:04 +0000391 // Return the status for a given opened oat file with respect to the dex
392 // location.
393 OatStatus GivenOatFileStatus(const OatFile& file);
394
Richard Uhler66d874d2015-01-15 09:37:19 -0800395 // Returns the current image location.
396 // Returns an empty string if the image location could not be retrieved.
397 //
398 // TODO: This method should belong with an image file manager, not
399 // the oat file assistant.
400 static std::string ImageLocation();
401
402 // Gets the dex checksum required for an up-to-date oat file.
403 // Returns dex_checksum if a required checksum was located. Returns
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700404 // null if the required checksum was not found.
Richard Uhler66d874d2015-01-15 09:37:19 -0800405 // The caller shouldn't clean up or free the returned pointer.
Richard Uhler9b994ea2015-06-24 08:44:19 -0700406 // This sets the has_original_dex_files_ field to true if a checksum was
407 // found for the dex_location_ dex file.
Richard Uhler66d874d2015-01-15 09:37:19 -0800408 const uint32_t* GetRequiredDexChecksum();
409
Richard Uhler66d874d2015-01-15 09:37:19 -0800410 // Returns the loaded image info.
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700411 // Loads the image info if needed. Returns null if the image info failed
Richard Uhler66d874d2015-01-15 09:37:19 -0800412 // to load.
413 // The caller shouldn't clean up or free the returned pointer.
414 const ImageInfo* GetImageInfo();
415
Jeff Haob11ffb72016-04-07 15:40:54 -0700416 uint32_t GetCombinedImageChecksum();
417
Richard Uhler66d874d2015-01-15 09:37:19 -0800418 // To implement Lock(), we lock a dummy file where the oat file would go
419 // (adding ".flock" to the target file name) and retain the lock for the
420 // remaining lifetime of the OatFileAssistant object.
Richard Uhler66d874d2015-01-15 09:37:19 -0800421 ScopedFlock flock_;
422
Richard Uhler740eec92015-10-15 15:12:23 -0700423 std::string dex_location_;
Richard Uhler66d874d2015-01-15 09:37:19 -0800424
425 // In a properly constructed OatFileAssistant object, isa_ should be either
426 // the 32 or 64 bit variant for the current device.
427 const InstructionSet isa_ = kNone;
428
Richard Uhler66d874d2015-01-15 09:37:19 -0800429 // Whether we will attempt to load oat files executable.
430 bool load_executable_ = false;
431
432 // Cached value of the required dex checksum.
433 // This should be accessed only by the GetRequiredDexChecksum() method.
Richard Uhler9b994ea2015-06-24 08:44:19 -0700434 uint32_t cached_required_dex_checksum_;
435 bool required_dex_checksum_attempted_ = false;
436 bool required_dex_checksum_found_;
437 bool has_original_dex_files_;
Richard Uhler66d874d2015-01-15 09:37:19 -0800438
Richard Uhler743bf362016-04-19 15:39:37 -0700439 OatFileInfo odex_;
440 OatFileInfo oat_;
Richard Uhler66d874d2015-01-15 09:37:19 -0800441
442 // Cached value of the image info.
443 // Use the GetImageInfo method rather than accessing these directly.
444 // TODO: The image info should probably be moved out of the oat file
445 // assistant to an image file manager.
446 bool image_info_load_attempted_ = false;
447 bool image_info_load_succeeded_ = false;
448 ImageInfo cached_image_info_;
Jeff Haob11ffb72016-04-07 15:40:54 -0700449 uint32_t combined_image_checksum_ = 0;
Richard Uhler66d874d2015-01-15 09:37:19 -0800450
Richard Uhler66d874d2015-01-15 09:37:19 -0800451 DISALLOW_COPY_AND_ASSIGN(OatFileAssistant);
452};
453
Narayan Kamath8943c1d2016-05-02 13:14:48 +0100454std::ostream& operator << (std::ostream& stream, const OatFileAssistant::OatStatus status);
455
Richard Uhler66d874d2015-01-15 09:37:19 -0800456} // namespace art
457
458#endif // ART_RUNTIME_OAT_FILE_ASSISTANT_H_