Home
last modified time | relevance | path

Searched refs:dex_ir (Results 1 – 19 of 19) sorted by relevance

/aosp12/art/dexlayout/
H A Ddex_verify.h37 bool VerifyId(dex_ir::StringId* orig, dex_ir::StringId* output, std::string* error_msg);
38 bool VerifyId(dex_ir::TypeId* orig, dex_ir::TypeId* output, std::string* error_msg);
39 bool VerifyId(dex_ir::ProtoId* orig, dex_ir::ProtoId* output, std::string* error_msg);
40 bool VerifyId(dex_ir::FieldId* orig, dex_ir::FieldId* output, std::string* error_msg);
41 bool VerifyId(dex_ir::MethodId* orig, dex_ir::MethodId* output, std::string* error_msg);
43 bool VerifyClassDefs(dex_ir::CollectionVector<dex_ir::ClassDef>& orig,
44 dex_ir::CollectionVector<dex_ir::ClassDef>& output,
46 bool VerifyClassDef(dex_ir::ClassDef* orig, dex_ir::ClassDef* output, std::string* error_msg);
48 bool VerifyTypeList(const dex_ir::TypeList* orig, const dex_ir::TypeList* output);
90 bool VerifyClassData(dex_ir::ClassData* orig, dex_ir::ClassData* output, std::string* error_msg);
[all …]
H A Ddex_ir.cc31 namespace dex_ir { namespace
48 std::function<uint32_t(dex_ir::Header*)> size_fn;
50 std::function<uint32_t(dex_ir::Header*)> offset_fn;
62 [](const dex_ir::Header* h) { return h->StringIds().Size(); }, in __anonf33c4afe0102()
67 [](const dex_ir::Header* h) { return h->TypeIds().Size(); }, in __anonf33c4afe0302()
72 [](const dex_ir::Header* h) { return h->ProtoIds().Size(); }, in __anonf33c4afe0502()
77 [](const dex_ir::Header* h) { return h->FieldIds().Size(); }, in __anonf33c4afe0702()
152 std::vector<dex_ir::DexFileSection> GetSortedDexFileSections(dex_ir::Header* header, in GetSortedDexFileSections()
154 std::vector<dex_ir::DexFileSection> sorted_sections; in GetSortedDexFileSections()
157 sorted_sections.push_back(dex_ir::DexFileSection(s.name, in GetSortedDexFileSections()
[all …]
H A Ddex_verify.cc75 bool VerifyId(dex_ir::StringId* orig, dex_ir::StringId* output, std::string* error_msg) { in VerifyId()
87 bool VerifyId(dex_ir::TypeId* orig, dex_ir::TypeId* output, std::string* error_msg) { in VerifyId()
99 bool VerifyId(dex_ir::ProtoId* orig, dex_ir::ProtoId* output, std::string* error_msg) { in VerifyId()
124 bool VerifyId(dex_ir::FieldId* orig, dex_ir::FieldId* output, std::string* error_msg) { in VerifyId()
153 bool VerifyId(dex_ir::MethodId* orig, dex_ir::MethodId* output, std::string* error_msg) { in VerifyId()
183 bool operator()(dex_ir::ClassDef* lhs, dex_ir::ClassDef* rhs) const { in operator ()()
190 bool VerifyClassDefs(dex_ir::CollectionVector<dex_ir::ClassDef>& orig, in VerifyClassDefs()
191 dex_ir::CollectionVector<dex_ir::ClassDef>& output, in VerifyClassDefs()
224 bool VerifyClassDef(dex_ir::ClassDef* orig, dex_ir::ClassDef* output, std::string* error_msg) { in VerifyClassDef()
279 bool VerifyTypeList(const dex_ir::TypeList* orig, const dex_ir::TypeList* output) { in VerifyTypeList()
[all …]
H A Ddex_visualize.cc49 explicit Dumper(dex_ir::Header* header) in Dumper()
52 dex_ir::GetSortedDexFileSections(header, dex_ir::SortDirection::kSortDescending)) { } in Dumper()
68 for (const dex_ir::DexFileSection& s : sorted_sections_) { in OpenAndPrintHeader()
154 const dex_ir::TypeList* type_list = proto_id->Parameters(); in DumpProtoId()
173 void DumpMethodItem(dex_ir::MethodItem* method, in DumpMethodItem()
188 const dex_ir::CodeItem* code_item = method->GetCodeItem(); in DumpMethodItem()
193 for (dex_ir::TypeId* type_id : fixups->TypeIds()) { in DumpMethodItem()
202 for (dex_ir::FieldId* field_id : fixups->FieldIds()) { in DumpMethodItem()
236 std::vector<dex_ir::DexFileSection> sorted_sections_;
245 void VisualizeDexLayout(dex_ir::Header* header, in VisualizeDexLayout()
[all …]
H A Ddexlayout.h107 dex_ir::Header* header) in DexLayout()
120 dex_ir::Header* GetHeader() const { return header_; } in GetHeader()
138 void DumpCatches(const dex_ir::CodeItem* code);
143 const dex_ir::CodeItem* code,
148 const dex_ir::ProtoId* proto);
153 void DumpInstruction(const dex_ir::CodeItem* code,
159 void DumpLocalInfo(const dex_ir::CodeItem* code);
163 const dex_ir::CodeItem* code,
165 void DumpPositionInfo(const dex_ir::CodeItem* code);
170 dex_ir::EncodedValue* init);
[all …]
H A Ddexlayout.cc540 dex_ir::TypeId* type_id = data->GetTypeId(); in DumpEncodedValue()
546 dex_ir::FieldId* field_id = data->GetFieldId(); in DumpEncodedValue()
1456 dex_ir::EncodedValueVector* encoded_values = in DumpClass()
1607 dex_ir::CollectionVector<dex_ir::ClassDef>& class_defs = header_->ClassDefs(); in LayoutClassDefsAndClassData()
1688 std::vector<dex_ir::StringId*> string_ids; in LayoutStringData()
1713 for (dex_ir::StringId* string_id : string_ids) { in LayoutStringData()
1719 std::unordered_set<dex_ir::StringData*> visited; in LayoutStringData()
1893 std::unique_ptr<dex_ir::Header> header(dex_ir::DexIrBuilder(*dex_file, in ProcessDexFile()
1970 dex_ir::DexIrBuilder(*output_dex_file, in ProcessDexFile()
1973 std::unique_ptr<dex_ir::Header> orig_header( in ProcessDexFile()
[all …]
H A Ddex_writer.h227 void WriteEncodedValue(Stream* stream, dex_ir::EncodedValue* encoded_value);
229 void WriteEncodedArray(Stream* stream, dex_ir::EncodedValueVector* values);
230 void WriteEncodedAnnotation(Stream* stream, dex_ir::EncodedAnnotation* annotation);
231 void WriteEncodedFields(Stream* stream, dex_ir::FieldItemVector* fields);
232 void WriteEncodedMethods(Stream* stream, dex_ir::MethodItemVector* methods);
265 dex_ir::CodeItem* item,
268 virtual void WriteDebugInfoItem(Stream* stream, dex_ir::DebugInfoItem* debug_info);
269 virtual void WriteStringData(Stream* stream, dex_ir::StringData* string_data);
273 void ProcessOffset(Stream* stream, dex_ir::Item* item);
274 void ProcessOffset(Stream* stream, dex_ir::CollectionBase* item);
[all …]
H A Dcompact_dex_writer.cc53 dex_ir::ClassData* class_data = class_def->GetClassData(); in WriteDebugInfoOffsetTable()
60 const dex_ir::MethodId* method_id = method.GetMethodId(); in WriteDebugInfoOffsetTable()
61 dex_ir::CodeItem* code_item = method.GetCodeItem(); in WriteDebugInfoOffsetTable()
143 dex_ir::CodeItem* code_item, in WriteCodeItem()
240 dex_ir::ClassData* class_data = class_def->GetClassData(); in SortDebugInfosByMethodIndex()
247 const dex_ir::MethodId* method_id = method.GetMethodId(); in SortDebugInfosByMethodIndex()
248 dex_ir::CodeItem* code_item = method.GetCodeItem(); in SortDebugInfosByMethodIndex()
258 [&](const std::unique_ptr<dex_ir::DebugInfoItem>& a, in SortDebugInfosByMethodIndex()
340 dex_ir::ClassData* class_data = class_def->GetClassData(); in CanGenerateCompactDex()
348 dex_ir::CodeItem* code_item = method.GetCodeItem(); in CanGenerateCompactDex()
[all …]
H A Ddex_writer.cc193 for (std::unique_ptr<dex_ir::EncodedValue>& value : *values) { in WriteEncodedArray()
201 for (std::unique_ptr<dex_ir::AnnotationElement>& annotation_element : in WriteEncodedAnnotation()
290 for (const dex_ir::TypeId* type_id : *type_list->GetTypeList()) { in WriteTypeLists()
436 for (std::unique_ptr<dex_ir::FieldAnnotation>& field : in WriteAnnotationsDirectories()
444 for (std::unique_ptr<dex_ir::MethodAnnotation>& method : in WriteAnnotationsDirectories()
452 for (std::unique_ptr<dex_ir::ParameterAnnotation>& parameter : in WriteAnnotationsDirectories()
490 dex_ir::ClassDef* class_def = header_->ClassDefs()[i]; in WriteHiddenapiClassData()
495 dex_ir::ClassData* class_data = class_def->GetClassData(); in WriteHiddenapiClassData()
572 dex_ir::CodeItem* code_item, in WriteCodeItem()
659 for (const std::unique_ptr<dex_ir::ClassData>& class_data : in WriteClassDatas()
[all …]
H A Ddex_visualize.h32 namespace dex_ir {
36 void VisualizeDexLayout(dex_ir::Header* header,
41 void ShowDexSectionStatistics(dex_ir::Header* header, size_t dex_file_index);
H A Dcompact_dex_writer.h97 ScopedDataSectionItem(Stream* stream, dex_ir::Item* item, size_t alignment, Deduper* deduper);
103 dex_ir::Item* const item_;
148 void WriteCodeItem(Stream* stream, dex_ir::CodeItem* code_item, bool reserve_only) override;
150 void WriteStringData(Stream* stream, dex_ir::StringData* string_data) override;
152 void WriteDebugInfoItem(Stream* stream, dex_ir::DebugInfoItem* debug_info) override;
H A Ddexdiag.cc187 const std::vector<dex_ir::DexFileSection>& sections) { in FindSectionTypeForPage()
207 const std::vector<dex_ir::DexFileSection>& sections, in ProcessPageMap()
235 const std::vector<dex_ir::DexFileSection>& sections, in DisplayDexStatistics()
251 const dex_ir::DexFileSection& section = sections[i - 1]; in DisplayDexStatistics()
300 std::vector<dex_ir::DexFileSection> sections; in ProcessOneDexMapping()
303 std::unique_ptr<dex_ir::Header> header(dex_ir::DexIrBuilder(*dex_file, in ProcessOneDexMapping()
306 sections = dex_ir::GetSortedDexFileSections(header.get(), in ProcessOneDexMapping()
307 dex_ir::SortDirection::kSortDescending); in ProcessOneDexMapping()
H A Ddex_ir_builder.h28 namespace dex_ir {
32 dex_ir::Header* DexIrBuilder(const DexFile& dex_file,
H A Ddex_ir_builder.cc32 namespace dex_ir { namespace
649 for (const dex_ir::FieldItem& field : *class_data->StaticFields()) { in AddHiddenapiClassDataFromMapListSection()
652 for (const dex_ir::FieldItem& field : *class_data->InstanceFields()) { in AddHiddenapiClassDataFromMapListSection()
655 for (const dex_ir::MethodItem& method : *class_data->DirectMethods()) { in AddHiddenapiClassDataFromMapListSection()
658 for (const dex_ir::MethodItem& method : *class_data->VirtualMethods()) { in AddHiddenapiClassDataFromMapListSection()
H A DAndroid.bp31 "dex_ir.cc",
H A Ddex_ir.h35 namespace dex_ir {
1356 std::vector<DexFileSection> GetSortedDexFileSections(dex_ir::Header* header,
/aosp12/art/test/980-redefine-object/
H A Dredef_object.cc62 auto dex_ir = reader.GetIr(); in RedefineObjectHook() local
64 slicer::MethodInstrumenter mi(dex_ir); in RedefineObjectHook()
77 dex::Writer writer(dex_ir); in RedefineObjectHook()
/aosp12/art/test/1959-redefine-object-instrument/
H A Dfake_redef_object.cc63 auto dex_ir = reader.GetIr(); in RedefineObjectHook() local
64 dex::Writer writer(dex_ir); in RedefineObjectHook()
/aosp12/art/test/ti-stress/
H A Dstress.cc79 auto dex_ir = reader.GetIr(); in DoExtractClassFromData() local
82 for (auto& ir_method : dex_ir->encoded_methods) { in DoExtractClassFromData()
84 lir::CodeIr code_ir(ir_method.get(), dex_ir); in DoExtractClassFromData()
91 dex::Writer writer(dex_ir); in DoExtractClassFromData()