/tools/dexter/slicer/export/slicer/ |
D | writer.h | 29 namespace dex { 35 explicit Section(dex::u2 mapEntryType) : map_entry_type_(mapEntryType) {} in Section() 41 void SetOffset(dex::u4 offset) { in SetOffset() 46 dex::u4 SectionOffset() const { in SectionOffset() 51 dex::u4 AbsoluteOffset(dex::u4 itemOffset) const { in AbsoluteOffset() 58 dex::u4 AddItem(dex::u4 alignment = 1) { 64 dex::u4 ItemsCount() const { return count_; } in ItemsCount() 66 dex::u2 MapEntryType() const { return map_entry_type_; } in MapEntryType() 69 dex::u4 offset_ = 0; 70 dex::u4 count_ = 0; [all …]
|
D | reader.h | 28 namespace dex { 39 Reader(const dex::u1* image, size_t size); 48 const dex::Header* Header() const { return header_; } in Header() 49 const char* GetStringMUTF8(dex::u4 index) const; 50 slicer::ArrayView<const dex::ClassDef> ClassDefs() const; 51 slicer::ArrayView<const dex::StringId> StringIds() const; 52 slicer::ArrayView<const dex::TypeId> TypeIds() const; 53 slicer::ArrayView<const dex::FieldId> FieldIds() const; 54 slicer::ArrayView<const dex::MethodId> MethodIds() const; 55 slicer::ArrayView<const dex::ProtoId> ProtoIds() const; [all …]
|
D | code_ir.h | 49 constexpr dex::u4 kInvalidOffset = dex::u4(-1); 133 dex::s4 s4_value; 134 dex::u4 u4_value; 138 explicit Const32(dex::u4 value) { u.u4_value = value; } in Const32() 145 dex::s8 s8_value; 146 dex::u8 u8_value; 150 explicit Const64(dex::u8 value) { u.u8_value = value; } in Const64() 156 dex::u4 reg; 158 explicit VReg(dex::u4 reg) : reg(reg) {} in VReg() 164 dex::u4 base_reg; [all …]
|
D | bytecode_encoder.h | 54 void FixupPackedSwitch(dex::u4 base_offset, dex::u4 payload_offset); 55 void FixupSparseSwitch(dex::u4 base_offset, dex::u4 payload_offset); 61 dex::u4 offset; // instruction to be fixed up 65 LabelFixup(dex::u4 offset, Label* label, bool short_fixup) : in LabelFixup() 74 dex::u4 offset_ = 0; 77 dex::u4 outs_count_ = 0; 81 std::map<dex::u4, const PackedSwitchPayload*> packed_switches_; 82 std::map<dex::u4, const SparseSwitchPayload*> sparse_switches_;
|
D | dex_ir.h | 122 dex::u4 index; 126 dex::u4 orig_index; 132 dex::u1 type; 167 const dex::u1* strData = data.ptr<dex::u1>(); in c_str() 168 dex::ReadULeb128(&strData); in c_str() 204 dex::u2 method_handle_type; 223 dex::u4 access_flags; 229 dex::u4 line_start; 240 dex::u2 registers; 241 dex::u2 ins_count; [all …]
|
D | buffer.h | 130 size_t PushULeb128(dex::u4 value) { in PushULeb128() 131 dex::u1 tmp[4]; in PushULeb128() 132 dex::u1* end = dex::WriteULeb128(tmp, value); in PushULeb128() 137 size_t PushSLeb128(dex::s4 value) { in PushSLeb128() 138 dex::u1 tmp[4]; in PushSLeb128() 139 dex::u1* end = dex::WriteSLeb128(tmp, value); in PushSLeb128() 155 const dex::u1* data() const { in data() 165 buff_ = static_cast<dex::u1*>(::realloc(buff_, capacity_)); in Expand() 172 dex::u1* buff_ = nullptr;
|
D | instrumentation.h | 141 virtual dex::Opcode GetNewOpcode(dex::Opcode opcode) = 0; 153 virtual dex::Opcode GetNewOpcode(dex::Opcode opcode) override; 165 virtual dex::Opcode GetNewOpcode(dex::Opcode opcode) override; 178 const std::set<dex::u4>& ScratchRegs() const { in ScratchRegs() 186 void Allocate(lir::CodeIr* code_ir, dex::u4 first_reg, int count); 192 std::set<dex::u4> scratch_regs_;
|
D | index_map.h | 29 dex::u4 AllocateIndex() { in AllocateIndex() 38 void MarkUsedIndex(dex::u4 index) { in MarkUsedIndex() 48 dex::u4 alloc_pos_ = 0;
|
D | debuginfo_encoder.h | 46 dex::u4 line_start_ = 0; 47 dex::u4 last_line_ = 0; 48 dex::u4 last_address_ = 0;
|
/tools/dexter/slicer/ |
D | bytecode_encoder.cc | 29 static dex::u2 Pack_Z_8(dex::u4 a) { in Pack_Z_8() 30 dex::u2 fa = (a & 0xff); in Pack_Z_8() 36 static dex::u2 Pack_8_8(dex::u4 a, dex::u4 b) { in Pack_8_8() 37 dex::u2 fa = (a & 0xff); in Pack_8_8() 39 dex::u2 fb = (b & 0xff); in Pack_8_8() 45 static dex::u2 Pack_4_4_8(dex::u4 a, dex::u4 b, dex::u4 c) { in Pack_4_4_8() 46 dex::u2 fa = (a & 0xf); in Pack_4_4_8() 48 dex::u2 fb = (b & 0xf); in Pack_4_4_8() 50 dex::u2 fc = (c & 0xff); in Pack_4_4_8() 56 static dex::u2 Pack_4_4_4_4(dex::u4 a, dex::u4 b, dex::u4 c, dex::u4 d) { in Pack_4_4_4_4() [all …]
|
D | reader.cc | 28 namespace dex { namespace 30 Reader::Reader(const dex::u1* image, size_t size) : image_(image), size_(size) { in Reader() 32 header_ = ptr<dex::Header>(0); in Reader() 37 dex_ir_->magic = slicer::MemView(header_, sizeof(dex::Header::magic)); in Reader() 40 slicer::ArrayView<const dex::ClassDef> Reader::ClassDefs() const { in ClassDefs() 41 return section<dex::ClassDef>(header_->class_defs_off, in ClassDefs() 45 slicer::ArrayView<const dex::StringId> Reader::StringIds() const { in StringIds() 46 return section<dex::StringId>(header_->string_ids_off, in StringIds() 50 slicer::ArrayView<const dex::TypeId> Reader::TypeIds() const { in TypeIds() 51 return section<dex::TypeId>(header_->type_ids_off, in TypeIds() [all …]
|
D | writer.cc | 32 namespace dex { namespace 36 static dex::u4 OptIndex(const T* ir_node) { in OptIndex() 37 return ir_node != nullptr ? ir_node->index : dex::kNoIndex; in OptIndex() 41 static void WriteEncodedValueHeader(dex::u1 type, int arg, Section& data) { in WriteEncodedValueHeader() 42 assert((type & ~dex::kEncodedValueTypeMask) == 0); in WriteEncodedValueHeader() 44 dex::u1 header = dex::u1(type | (arg << dex::kEncodedValueArgShift)); in WriteEncodedValueHeader() 45 data.Push<dex::u1>(header); in WriteEncodedValueHeader() 50 static void WriteIntValue(dex::u1 type, T value, Section& data) { in WriteIntValue() 51 dex::u1 buff[sizeof(T)] = {}; in WriteIntValue() 52 dex::u1* dst = buff; in WriteIntValue() [all …]
|
D | code_ir.cc | 70 const dex::u1* ptr = in DisassembleTryBlocks() 71 ir_code->catch_handlers.ptr<dex::u1>() + tryBlock.handler_off; in DisassembleTryBlocks() 72 int catchCount = dex::ReadSLeb128(&ptr); in DisassembleTryBlocks() 78 dex::u4 type_index = dex::ReadULeb128(&ptr); in DisassembleTryBlocks() 83 dex::u4 address = dex::ReadULeb128(&ptr); in DisassembleTryBlocks() 95 dex::u4 address = dex::ReadULeb128(&ptr); in DisassembleTryBlocks() 114 dex::u4 address = 0; in DisassembleDebugInfo() 128 auto annotation = Alloc<DbgInfoAnnotation>(dex::DBG_SET_FILE); in DisassembleDebugInfo() 131 source_file, source_file ? source_file->orig_index : dex::kNoIndex)); in DisassembleDebugInfo() 137 auto annotation = Alloc<DbgInfoAnnotation>(dex::DBG_ADVANCE_LINE); in DisassembleDebugInfo() [all …]
|
D | debuginfo_encoder.cc | 38 dbginfo_.Push<dex::u1>(dex::DBG_ADVANCE_PC); in Visit() 45 case dex::DBG_ADVANCE_LINE: { in Visit() 60 int adj_opcode = delta - dex::DBG_LINE_BASE; in Visit() 62 if (adj_opcode < 0 || adj_opcode >= dex::DBG_LINE_RANGE) { in Visit() 63 dbginfo_.Push<dex::u1>(dex::DBG_ADVANCE_LINE); in Visit() 65 adj_opcode = -dex::DBG_LINE_BASE; in Visit() 67 assert(adj_opcode >= 0 && dex::DBG_FIRST_SPECIAL + adj_opcode < 256); in Visit() 68 dex::u1 special_opcode = dex::DBG_FIRST_SPECIAL + adj_opcode; in Visit() 69 dbginfo_.Push<dex::u1>(special_opcode); in Visit() 74 case dex::DBG_START_LOCAL: { in Visit() [all …]
|
D | instrumentation.cc | 39 dex::u4 src_reg, in BoxValue() 40 dex::u4 dst_reg) { in BoxValue() 87 boxing_invoke->opcode = dex::OP_INVOKE_STATIC_RANGE; in BoxValue() 93 move_result->opcode = dex::OP_MOVE_RESULT_OBJECT; in BoxValue() 128 if ((ir_method->access_flags & dex::kAccStatic) == 0) { in Apply() 161 hook_invoke->opcode = dex::OP_INVOKE_STATIC_RANGE; in Apply() 170 void GenerateShiftParamsCode(lir::CodeIr* code_ir, lir::Instruction* position, dex::u4 shift) { in GenerateShiftParamsCode() 181 if ((ir_method->access_flags & dex::kAccStatic) == 0) { in GenerateShiftParamsCode() 189 const dex::u4 regs = ir_method->code->registers; in GenerateShiftParamsCode() 190 const dex::u4 ins_count = ir_method->code->ins_count; in GenerateShiftParamsCode() [all …]
|
D | control_flow_graph.cc | 55 const auto flags = dex::GetFlagsFromOpcode(bytecode->opcode); in Visit() 58 dex::kBranch | in Visit() 59 dex::kSwitch | in Visit() 60 dex::kThrow | in Visit() 61 dex::kReturn; in Visit() 65 dex::kBranch | in Visit() 66 dex::kSwitch | in Visit() 67 dex::kReturn; in Visit() 68 terminate_block = bytecode->opcode == dex::OP_THROW || (flags & exit_instr_flags) != 0; in Visit()
|
D | tryblocks_encoder.cc | 25 const dex::u4 begin_offset = try_end->try_begin->offset; in Visit() 26 const dex::u4 end_offset = try_end->offset; in Visit() 31 dex::TryBlock try_block = {}; in Visit() 38 dex::s4 catch_count = try_end->handlers.size(); in Visit() 105 auto tries_ptr = tries_.ptr<const dex::TryBlock>(0); in Encode() 106 ir_code->try_blocks = slicer::ArrayView<const dex::TryBlock>(tries_ptr, tries_count); in Encode()
|
D | dex_ir.cc | 45 return dex::Utf8Cmp(string_key, string->c_str()) == 0; in Compare() 78 return dex::DescriptorToDecl(descriptor->c_str()); in Decl() 113 method_handle_type == dex::METHOD_HANDLE_TYPE_STATIC_PUT || in IsField() 114 method_handle_type == dex::METHOD_HANDLE_TYPE_STATIC_GET || in IsField() 115 method_handle_type == dex::METHOD_HANDLE_TYPE_INSTANCE_PUT || in IsField() 116 method_handle_type == dex::METHOD_HANDLE_TYPE_INSTANCE_GET in IsField() 137 void DexFile::TopSortClassIndex(Class* irClass, dex::u4* nextIndex) { in TopSortClassIndex() 138 if (irClass->index == dex::u4(-1)) { in TopSortClassIndex() 160 irClass->index = dex::u4(-1); in SortClassIndexes() 163 dex::u4 nextIndex = 0; in SortClassIndexes() [all …]
|
/tools/dexter/dexter/ |
D | dexter.cc | 129 static void PrintDexMap(const dex::Reader& reader) { in PrintDexMap() 132 const dex::MapList& dexMap = *reader.DexMapList(); in PrintDexMap() 133 for (dex::u4 i = 0; i < dexMap.size; ++i) { in PrintDexMap() 134 const dex::MapItem& section = dexMap.list[i]; in PrintDexMap() 137 case dex::kHeaderItem: in PrintDexMap() 140 case dex::kStringIdItem: in PrintDexMap() 143 case dex::kTypeIdItem: in PrintDexMap() 146 case dex::kProtoIdItem: in PrintDexMap() 149 case dex::kFieldIdItem: in PrintDexMap() 152 case dex::kMethodIdItem: in PrintDexMap() [all …]
|
D | experimental.cc | 74 dex::Opcode new_call_opcode = dex::OP_NOP; in StressWrapInvoke() 76 case dex::OP_INVOKE_VIRTUAL: in StressWrapInvoke() 77 new_call_opcode = dex::OP_INVOKE_STATIC; in StressWrapInvoke() 79 case dex::OP_INVOKE_VIRTUAL_RANGE: in StressWrapInvoke() 80 new_call_opcode = dex::OP_INVOKE_STATIC_RANGE; in StressWrapInvoke() 86 assert(new_call_opcode != dex::OP_NOP); in StressWrapInvoke() 151 if ((ir_method->access_flags & dex::kAccStatic) == 0) { in StressEntryHook() 175 call->opcode = dex::OP_INVOKE_STATIC_RANGE; in StressEntryHook() 234 dex::Opcode move_result_opcode = dex::OP_NOP; in StressExitHook() 235 dex::u4 reg = 0; in StressExitHook() [all …]
|
D | disassembler.cc | 64 printf("\t%5u| %s", bytecode->offset, dex::GetOpcodeName(bytecode->opcode)); in Visit() 198 SLICER_CHECK_NE(type->index, dex::kNoIndex); in Visit() 205 SLICER_CHECK_NE(field->index, dex::kNoIndex); in Visit() 212 SLICER_CHECK_NE(method->index, dex::kNoIndex); in Visit() 222 SLICER_CHECK_NE(method_handle->index, dex::kNoIndex); in Visit() 234 SLICER_CHECK_NE(proto->index, dex::kNoIndex); in Visit() 291 case dex::DBG_START_LOCAL: in Visit() 294 case dex::DBG_START_LOCAL_EXTENDED: in Visit() 297 case dex::DBG_END_LOCAL: in Visit() 300 case dex::DBG_RESTART_LOCAL: in Visit() [all …]
|
/tools/dexter/slicer/tests/src/ |
D | slicer_test.cpp | 40 ss << dex::Opcode::OP_IF_GTZ; in TEST() 46 ss << dex::InstructionFormat::k20bc; in TEST() 52 ss << static_cast<dex::InstructionFormat>(0xfe); in TEST()
|
/tools/trebuchet/trebuchet/startup-analyzer/ |
D | README.md | 108 Open dex file 128 Open dex file function invocation 135 … /data/dalvik-cache/arm/system@framework@org.apache.http.legacy.impl.jar@classes.dex @ 0.028 ms 137 … /data/dalvik-cache/arm/system@framework@com.google.android.maps.jar@classes.dex @ 0.026 ms 139 …vik-cache/arm/data@app@com.facebook.katana-Hu0CRasfgvX30RlV_mJxBA==@base.apk@classes.dex @ 0.026 ms 141 …ata@app@com.facebook.katana-Hu0CRasfgvX30RlV_mJxBA==@split_codegenerator.apk@classes.dex @ 0.017 ms 157 … /data/app/com.facebook.katana-Hu0CRasfgvX30RlV_mJxBA==/base.apk!classes2.dex @ 0.061 ms 158 … /data/app/com.facebook.katana-Hu0CRasfgvX30RlV_mJxBA==/base.apk!classes9.dex @ 0.054 ms 159 … /data/app/com.facebook.katana-Hu0CRasfgvX30RlV_mJxBA==/base.apk!classes3.dex @ 0.063 ms
|
/tools/dexter/testdata/expected/ |
D | mi.stats | 2 .dex file statistics: 16 .dex IR statistics:
|
D | medium.stats | 2 .dex file statistics: 16 .dex IR statistics:
|