Home
last modified time | relevance | path

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

/art/dexlayout/
Ddex_verify.h29 bool VerifyOutputDexFile(dex_ir::Header* orig_header,
30 dex_ir::Header* output_header,
33 template<class T> bool VerifyIds(dex_ir::CollectionVector<T>& orig,
34 dex_ir::CollectionVector<T>& output,
37 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,
[all …]
Ddex_ir.cc31 namespace dex_ir { namespace
33 static uint32_t HeaderOffset(const dex_ir::Header* header ATTRIBUTE_UNUSED) { in HeaderOffset()
37 static uint32_t HeaderSize(const dex_ir::Header* header ATTRIBUTE_UNUSED) { in HeaderSize()
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 __anon2b802b990102()
63 [](const dex_ir::Header* h) { return h->StringIds().GetOffset(); } in __anon2b802b990202()
67 [](const dex_ir::Header* h) { return h->TypeIds().Size(); }, in __anon2b802b990302()
68 [](const dex_ir::Header* h) { return h->TypeIds().GetOffset(); } in __anon2b802b990402()
72 [](const dex_ir::Header* h) { return h->ProtoIds().Size(); }, in __anon2b802b990502()
[all …]
Ddex_verify.cc33 bool VerifyOutputDexFile(dex_ir::Header* orig_header, in VerifyOutputDexFile()
34 dex_ir::Header* output_header, in VerifyOutputDexFile()
51 template<class T> bool VerifyIds(dex_ir::CollectionVector<T>& orig, in VerifyIds()
52 dex_ir::CollectionVector<T>& output, in VerifyIds()
75 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 ()()
[all …]
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()
86 for (const dex_ir::DexFileSection& file_section : sorted_sections_) { in GetColor()
107 void DumpAddressRange(const dex_ir::Item* item, int class_index) { in DumpAddressRange()
113 void DumpStringData(const dex_ir::StringData* string_data, int class_index) { in DumpStringData()
117 void DumpStringId(const dex_ir::StringId* string_id, int class_index) { in DumpStringId()
125 void DumpTypeId(const dex_ir::TypeId* type_id, int class_index) { in DumpTypeId()
130 void DumpFieldId(const dex_ir::FieldId* field_id, int class_index) { in DumpFieldId()
140 void DumpFieldItem(const dex_ir::FieldItem* field, int class_index) { in DumpFieldItem()
[all …]
Ddexlayout.h83 std::unordered_map<dex_ir::CodeItem*, LayoutType> code_item_layout_;
107 dex_ir::Header* header) in DexLayout()
120 dex_ir::Header* GetHeader() const { return header_; } in GetHeader()
121 void SetHeader(dex_ir::Header* header) { header_ = header; } in SetHeader()
136 void DumpAnnotationSetItem(dex_ir::AnnotationSetItem* set_item);
137 void DumpBytecodes(uint32_t idx, const dex_ir::CodeItem* code, uint32_t code_offset);
138 void DumpCatches(const dex_ir::CodeItem* code);
143 const dex_ir::CodeItem* code,
148 const dex_ir::ProtoId* proto);
149 void DumpEncodedAnnotation(dex_ir::EncodedAnnotation* annotation);
[all …]
Ddexlayout.cc235 static std::string GetSignatureForProtoId(const dex_ir::ProtoId* proto) { in GetSignatureForProtoId()
241 const dex_ir::TypeList* type_list = proto->Parameters(); in GetSignatureForProtoId()
243 for (const dex_ir::TypeId* type_id : *type_list->GetTypeList()) { in GetSignatureForProtoId()
353 static std::unique_ptr<char[]> IndexString(dex_ir::Header* header, in IndexString()
424 dex_ir::MethodId* method_id = header->MethodIds()[index]; in IndexString()
436 dex_ir::FieldId* field_id = header->FieldIds()[index]; in IndexString()
457 dex_ir::MethodId* method_id = header->MethodIds()[index]; in IndexString()
464 dex_ir::ProtoId* proto_id = header->ProtoIds()[secondary_index]; in IndexString()
492 void DexLayout::DumpEncodedAnnotation(dex_ir::EncodedAnnotation* annotation) { in DumpEncodedAnnotation()
505 void DexLayout::DumpEncodedValue(const dex_ir::EncodedValue* data) { in DumpEncodedValue()
[all …]
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);
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,
267 virtual void WriteCodeItem(Stream* stream, dex_ir::CodeItem* item, bool reserve_only);
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);
[all …]
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()
107 dex_ir::Item* item, in ScopedDataSectionItem()
143 dex_ir::CodeItem* code_item, in WriteCodeItem()
204 void CompactDexWriter::WriteDebugInfoItem(Stream* stream, dex_ir::DebugInfoItem* debug_info) { in WriteDebugInfoItem()
236 std::map<const dex_ir::DebugInfoItem*, uint32_t> method_idx_map; in SortDebugInfosByMethodIndex()
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()
[all …]
Ddex_ir_builder.h28 namespace dex_ir {
32 dex_ir::Header* DexIrBuilder(const DexFile& dex_file,
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;
Ddex_writer.cc117 void DexWriter::WriteEncodedValue(Stream* stream, dex_ir::EncodedValue* encoded_value) { in WriteEncodedValue()
191 void DexWriter::WriteEncodedArray(Stream* stream, dex_ir::EncodedValueVector* values) { in WriteEncodedArray()
193 for (std::unique_ptr<dex_ir::EncodedValue>& value : *values) { in WriteEncodedArray()
198 void DexWriter::WriteEncodedAnnotation(Stream* stream, dex_ir::EncodedAnnotation* annotation) { in WriteEncodedAnnotation()
201 for (std::unique_ptr<dex_ir::AnnotationElement>& annotation_element : in WriteEncodedAnnotation()
208 void DexWriter::WriteEncodedFields(Stream* stream, dex_ir::FieldItemVector* fields) { in WriteEncodedFields()
218 void DexWriter::WriteEncodedMethods(Stream* stream, dex_ir::MethodItemVector* methods) { in WriteEncodedMethods()
248 void DexWriter::WriteStringData(Stream* stream, dex_ir::StringData* string_data) { in WriteStringData()
290 for (const dex_ir::TypeId* type_id : *type_list->GetTypeList()) { in WriteTypeLists()
390 for (dex_ir::AnnotationItem* annotation : *annotation_set->GetItems()) { in WriteAnnotationSets()
[all …]
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()
DAndroid.bp31 "dex_ir.cc",
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()
Ddex_ir.h35 namespace dex_ir {
1356 std::vector<DexFileSection> GetSortedDexFileSections(dex_ir::Header* header,
/art/test/980-redefine-object/
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()
/art/test/1959-redefine-object-instrument/
Dfake_redef_object.cc63 auto dex_ir = reader.GetIr(); in RedefineObjectHook() local
64 dex::Writer writer(dex_ir); in RedefineObjectHook()
/art/test/ti-stress/
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()