namespace linker { class LinkerPatch;
} // namespace linker
class CompiledMethod; enumclass InstructionSet;
// Interface for storing AOT-compiled artifacts. // These artifacts include compiled method code and related stack maps and // linker patches as well as the compiled thunk code required for some kinds // of linker patches. // // This interface is used for passing AOT-compiled code and metadata produced // by the `libart-compiler` to `dex2oat`. The `CompiledMethod` created by // `dex2oat` is completely opaque to the `libart-compiler`. class CompiledCodeStorage { public: virtual CompiledMethod* CreateCompiledMethod(InstructionSet instruction_set,
ArrayRef<const uint8_t> code,
ArrayRef<const uint8_t> stack_map,
ArrayRef<const uint8_t> cfi,
ArrayRef<const linker::LinkerPatch> patches, bool is_intrinsic) = 0;
// TODO: Rewrite the interface for passing thunks to the `dex2oat` to reduce // locking. The `OptimizingCompiler` is currently calling `GetThunkCode()` // and locking a mutex there for every `LinkerPatch` that needs a thunk to // check whether we need to compile it. Using a thunk compiler interface, // we could drive this from the `dex2oat` side and lock the mutex at most // once per `CreateCompiledMethod()` for any number of patches. virtual ArrayRef<const uint8_t> GetThunkCode(const linker::LinkerPatch& patch, /*out*/ std::string* debug_name = nullptr) = 0; virtualvoid SetThunkCode(const linker::LinkerPatch& patch,
ArrayRef<const uint8_t> code, const std::string& debug_name) = 0;
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.