// Fields listed here are key value store fields that are deterministic across hosts and devices, // meaning they should have exactly the same value when the oat file is generated on different // hosts and devices for the same app / boot image and for the same device model with the same // compiler options. If you are adding a new field that doesn't hold this property, put it in // `kNonDeterministicFieldsAndLengths` and assign a length limit. // // When writing the oat header, the non-deterministic fields are padded to their length limits and // excluded from the oat checksum computation. This makes the oat checksum deterministic across // hosts and devices, which is important for Cloud Compilation, where we generate an oat file on a // host and use it on a device. static constexpr std::array<std::string_view, 11> kDeterministicFields{kDebuggableKey,
kNativeDebuggableKey,
kCompilerFilter,
kClassPathKey,
kBootClassPathKey,
kBootClassPathChecksumsKey,
kConcurrentCopying,
kCompilationReasonKey,
kRequiresImage,
kAssumeValueSdkIntKey,
kEnableProfileCodeKey};
constchar* GetStoreValueByKey(constchar* key) const { // Do not get apex versions from the oat header directly. Use `OatFile::GetApexVersions` // instead.
DCHECK_NE(std::string_view(key), kApexVersionsKey); return GetStoreValueByKeyUnsafe(key);
}
// Returns the next key-value pair, at the given offset. On success, updates `offset`. // The expected use case is to start the iteration with an offset initialized to zero and // repeatedly call this function with the same offset pointer, until the function returns false. bool GetNextStoreKeyValuePair(/*inout*/ uint32_t* offset, /*out*/ const char** key, /*out*/ const char** value) const;
InstructionSet instruction_set_;
uint32_t instruction_set_features_bitmap_;
uint32_t dex_file_count_;
uint32_t oat_dex_files_offset_;
uint32_t bcp_bss_info_offset_; // Offset of the oat header (i.e. start of the oat data) in the ELF file. // It is used to additional validation of the oat header as it is not // page-aligned in the memory.
uint32_t base_oat_offset_;
uint32_t executable_offset_;
uint32_t jni_dlsym_lookup_trampoline_offset_;
uint32_t jni_dlsym_lookup_critical_trampoline_offset_;
uint32_t quick_generic_jni_trampoline_offset_;
uint32_t quick_imt_conflict_trampoline_offset_;
uint32_t quick_resolution_trampoline_offset_;
uint32_t quick_to_interpreter_bridge_offset_;
uint32_t nterp_trampoline_offset_;
uint32_t key_value_store_size_;
uint8_t key_value_store_[0]; // note variable width data at end
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.