• Home
  • Raw
  • Download

Lines Matching refs:os

162   bool Dump(std::ostream& os) {  in Dump()  argument
166 os << "MAGIC:\n"; in Dump()
167 os << oat_header.GetMagic() << "\n\n"; in Dump()
169 os << "CHECKSUM:\n"; in Dump()
170 os << StringPrintf("0x%08x\n\n", oat_header.GetChecksum()); in Dump()
172 os << "INSTRUCTION SET:\n"; in Dump()
173 os << oat_header.GetInstructionSet() << "\n\n"; in Dump()
175 os << "INSTRUCTION SET FEATURES:\n"; in Dump()
176 os << oat_header.GetInstructionSetFeatures().GetFeatureString() << "\n\n"; in Dump()
178 os << "DEX FILE COUNT:\n"; in Dump()
179 os << oat_header.GetDexFileCount() << "\n\n"; in Dump()
182 os << label " OFFSET:\n"; \ in Dump()
183 os << StringPrintf("0x%08x", oat_header.offset()); \ in Dump()
185 os << StringPrintf(" (%p)", oat_file_.Begin() + oat_header.offset()); \ in Dump()
187 os << StringPrintf("\n\n"); in Dump()
212 os << "IMAGE PATCH DELTA:\n"; in Dump()
213 os << StringPrintf("%d (0x%08x)\n\n", in Dump()
217 os << "IMAGE FILE LOCATION OAT CHECKSUM:\n"; in Dump()
218 os << StringPrintf("0x%08x\n\n", oat_header.GetImageFileLocationOatChecksum()); in Dump()
220 os << "IMAGE FILE LOCATION OAT BEGIN:\n"; in Dump()
221 os << StringPrintf("0x%08x\n\n", oat_header.GetImageFileLocationOatDataBegin()); in Dump()
225 os << "KEY VALUE STORE:\n"; in Dump()
230 os << key << " = " << value << "\n"; in Dump()
233 os << "\n"; in Dump()
237 os << "BEGIN:\n"; in Dump()
238 os << reinterpret_cast<const void*>(oat_file_.Begin()) << "\n\n"; in Dump()
240 os << "END:\n"; in Dump()
241 os << reinterpret_cast<const void*>(oat_file_.End()) << "\n\n"; in Dump()
244 os << "SIZE:\n"; in Dump()
245 os << oat_file_.Size() << "\n\n"; in Dump()
247 os << std::flush; in Dump()
252 if (!DumpOatDexFile(os, *oat_dex_file)) { in Dump()
256 os << std::flush; in Dump()
361 bool DumpOatDexFile(std::ostream& os, const OatFile::OatDexFile& oat_dex_file) { in DumpOatDexFile() argument
363 os << "OatDexFile:\n"; in DumpOatDexFile()
364 os << StringPrintf("location: %s\n", oat_dex_file.GetDexFileLocation().c_str()); in DumpOatDexFile()
365 os << StringPrintf("checksum: 0x%08x\n", oat_dex_file.GetDexFileLocationChecksum()); in DumpOatDexFile()
372 os << "NOT FOUND: " << error_msg << "\n\n"; in DumpOatDexFile()
373 os << std::flush; in DumpOatDexFile()
383 os << StringPrintf("%zd: %s (offset=0x%08x) (type_idx=%d)", in DumpOatDexFile()
388 Indenter indent_filter(os.rdbuf(), kIndentChar, kIndentBy1Count); in DumpOatDexFile()
395 os << std::flush; in DumpOatDexFile()
408 bool DumpOatClass(std::ostream& os, const OatFile::OatClass& oat_class, const DexFile& dex_file, in DumpOatClass() argument
413 os << std::flush; in DumpOatClass()
420 if (!DumpOatMethod(os, class_def, class_method_index, oat_class, dex_file, in DumpOatClass()
429 if (!DumpOatMethod(os, class_def, class_method_index, oat_class, dex_file, in DumpOatClass()
438 os << std::flush; in DumpOatClass()
447 bool DumpOatMethod(std::ostream& os, const DexFile::ClassDef& class_def, in DumpOatMethod() argument
453 os << StringPrintf("%d: %s (dex_method_idx=%d)\n", in DumpOatMethod()
456 Indenter indent1_filter(os.rdbuf(), kIndentChar, kIndentBy1Count); in DumpOatMethod()
486 os << std::flush; in DumpOatMethod()
532 os << std::flush; in DumpOatMethod()
646 os << std::flush; in DumpOatMethod()
650 void DumpSpillMask(std::ostream& os, uint32_t spill_mask, bool is_float) { in DumpSpillMask() argument
654 os << "("; in DumpSpillMask()
658 os << "fr" << i; in DumpSpillMask()
660 os << "r" << i; in DumpSpillMask()
664 os << ", "; in DumpSpillMask()
670 os << ")"; in DumpSpillMask()
673 void DumpVmap(std::ostream& os, const OatFile::OatMethod& oat_method) { in DumpVmap() argument
684 os << (first ? "v" : ", v") << dex_reg; in DumpVmap()
686 os << "/r" << cpu_reg; in DumpVmap()
688 os << "/fr" << cpu_reg; in DumpVmap()
696 os << "\n"; in DumpVmap()
700 void DescribeVReg(std::ostream& os, const OatFile::OatMethod& oat_method, in DescribeVReg() argument
710 os << (is_float ? "fr" : "r") << vmap_table.ComputeRegister(spill_mask, vmap_offset, kind); in DescribeVReg()
716 os << "[sp + #" << offset << "]"; in DescribeVReg()
721 void DumpGcMapRegisters(std::ostream& os, const OatFile::OatMethod& oat_method, in DumpGcMapRegisters() argument
728 os << " v" << reg << " ("; in DumpGcMapRegisters()
729 DescribeVReg(os, oat_method, code_item, reg, kReferenceVReg); in DumpGcMapRegisters()
730 os << ")"; in DumpGcMapRegisters()
733 os << ", v" << reg << " ("; in DumpGcMapRegisters()
734 DescribeVReg(os, oat_method, code_item, reg, kReferenceVReg); in DumpGcMapRegisters()
735 os << ")"; in DumpGcMapRegisters()
740 os << "No registers in GC map\n"; in DumpGcMapRegisters()
742 os << "\n"; in DumpGcMapRegisters()
745 void DumpGcMap(std::ostream& os, const OatFile::OatMethod& oat_method, in DumpGcMap() argument
757 os << StringPrintf("%p", native_pc); in DumpGcMap()
758 DumpGcMapRegisters(os, oat_method, code_item, map.RegWidth() * 8, map.GetBitMap(entry)); in DumpGcMap()
766 os << StringPrintf("0x%08x", dex_pc); in DumpGcMap()
767 DumpGcMapRegisters(os, oat_method, code_item, map.RegWidth() * 8, map.GetBitMap(entry)); in DumpGcMap()
772 void DumpMappingTable(std::ostream& os, const OatFile::OatMethod& oat_method) { in DumpMappingTable() argument
779 Indenter indent_filter(os.rdbuf(), kIndentChar, kIndentBy1Count); in DumpMappingTable()
783 os << "suspend point mappings {\n"; in DumpMappingTable()
787 os << "}\n"; in DumpMappingTable()
791 os << "catch entry mappings {\n"; in DumpMappingTable()
795 os << "}\n"; in DumpMappingTable()
800 uint32_t DumpMappingAtOffset(std::ostream& os, const OatFile::OatMethod& oat_method, in DumpMappingAtOffset() argument
807 os << StringPrintf("suspend point dex PC: 0x%04x\n", cur.DexPc()); in DumpMappingAtOffset()
815 os << StringPrintf("catch entry dex PC: 0x%04x\n", cur.DexPc()); in DumpMappingAtOffset()
823 void DumpGcMapAtNativePcOffset(std::ostream& os, const OatFile::OatMethod& oat_method, in DumpGcMapAtNativePcOffset() argument
835 os << "GC map objects: v" << reg << " ("; in DumpGcMapAtNativePcOffset()
836 DescribeVReg(os, oat_method, code_item, reg, kReferenceVReg); in DumpGcMapAtNativePcOffset()
837 os << ")"; in DumpGcMapAtNativePcOffset()
840 os << ", v" << reg << " ("; in DumpGcMapAtNativePcOffset()
841 DescribeVReg(os, oat_method, code_item, reg, kReferenceVReg); in DumpGcMapAtNativePcOffset()
842 os << ")"; in DumpGcMapAtNativePcOffset()
847 os << "\n"; in DumpGcMapAtNativePcOffset()
853 void DumpVRegsAtDexPc(std::ostream& os, verifier::MethodVerifier* verifier, in DumpVRegsAtDexPc() argument
863 os << "VRegs: v"; in DumpVRegsAtDexPc()
866 os << ", v"; in DumpVRegsAtDexPc()
868 os << reg << " ("; in DumpVRegsAtDexPc()
871 os << "Imprecise Constant: " << kinds.at((reg * 2) + 1) << ", "; in DumpVRegsAtDexPc()
872 DescribeVReg(os, oat_method, code_item, reg, kind); in DumpVRegsAtDexPc()
875 os << "Constant: " << kinds.at((reg * 2) + 1); in DumpVRegsAtDexPc()
878 DescribeVReg(os, oat_method, code_item, reg, kind); in DumpVRegsAtDexPc()
881 os << ")"; in DumpVRegsAtDexPc()
885 os << "\n"; in DumpVRegsAtDexPc()
890 void DumpDexCode(std::ostream& os, const DexFile& dex_file, const DexFile::CodeItem* code_item) { in DumpDexCode() argument
895 os << StringPrintf("0x%04zx: %s\n", i, instruction->DumpString(&dex_file).c_str()); in DumpDexCode()
901 verifier::MethodVerifier* DumpVerifier(std::ostream& os, uint32_t dex_method_idx, in DumpVerifier() argument
912 return verifier::MethodVerifier::VerifyMethodAndDump(os, dex_method_idx, dex_file, dex_cache, in DumpVerifier()
920 void DumpCode(std::ostream& os, verifier::MethodVerifier* verifier, in DumpCode() argument
930 os << "NO CODE!\n"; in DumpCode()
937 DumpMappingAtOffset(os, oat_method, offset, false); in DumpCode()
939 offset += disassembler_->Dump(os, quick_native_pc + offset); in DumpCode()
941 uint32_t dex_pc = DumpMappingAtOffset(os, oat_method, offset, true); in DumpCode()
943 DumpGcMapAtNativePcOffset(os, oat_method, code_item, offset); in DumpCode()
945 DumpVRegsAtDexPc(os, verifier, oat_method, code_item, dex_pc); in DumpCode()
966 explicit ImageDumper(std::ostream* os, gc::space::ImageSpace& image_space, in ImageDumper() argument
968 : os_(os), in ImageDumper()
974 std::ostream& os = *os_; in Dump() local
975 os << "MAGIC: " << image_header_.GetMagic() << "\n\n"; in Dump()
977 os << "IMAGE BEGIN: " << reinterpret_cast<void*>(image_header_.GetImageBegin()) << "\n\n"; in Dump()
979 os << "IMAGE BITMAP OFFSET: " << reinterpret_cast<void*>(image_header_.GetImageBitmapOffset()) in Dump()
982 os << "OAT CHECKSUM: " << StringPrintf("0x%08x\n\n", image_header_.GetOatChecksum()); in Dump()
984 os << "OAT FILE BEGIN:" << reinterpret_cast<void*>(image_header_.GetOatFileBegin()) << "\n\n"; in Dump()
986 os << "OAT DATA BEGIN:" << reinterpret_cast<void*>(image_header_.GetOatDataBegin()) << "\n\n"; in Dump()
988 os << "OAT DATA END:" << reinterpret_cast<void*>(image_header_.GetOatDataEnd()) << "\n\n"; in Dump()
990 os << "OAT FILE END:" << reinterpret_cast<void*>(image_header_.GetOatFileEnd()) << "\n\n"; in Dump()
992 os << "PATCH DELTA:" << image_header_.GetPatchDelta() << "\n\n"; in Dump()
994 os << "COMPILE PIC: " << (image_header_.CompilePic() ? "yes" : "no") << "\n\n"; in Dump()
997 os << "ROOTS: " << reinterpret_cast<void*>(image_header_.GetImageRoots()) << "\n"; in Dump()
998 Indenter indent1_filter(os.rdbuf(), kIndentChar, kIndentBy1Count); in Dump()
1036 os << "\n"; in Dump()
1041 os << "OAT LOCATION: " << oat_location; in Dump()
1042 os << "\n"; in Dump()
1048 os << "NOT FOUND: " << error_msg << "\n"; in Dump()
1052 os << "\n"; in Dump()
1064 os << "OBJECTS:\n" << std::flush; in Dump()
1089 Indenter indent_filter(os.rdbuf(), kIndentChar, kIndentBy1Count); in Dump()
1105 os << "STATS:\n" << std::flush; in Dump()
1119 stats_.Dump(os); in Dump()
1120 os << "\n"; in Dump()
1122 os << std::flush; in Dump()
1124 return oat_dumper_->Dump(os); in Dump()
1128 static void PrettyObjectValue(std::ostream& os, mirror::Class* type, mirror::Object* value) in PrettyObjectValue() argument
1132 os << StringPrintf("null %s\n", PrettyDescriptor(type).c_str()); in PrettyObjectValue()
1135 os << StringPrintf("%p String: %s\n", string, in PrettyObjectValue()
1139 os << StringPrintf("%p Class: %s\n", klass, PrettyDescriptor(klass).c_str()); in PrettyObjectValue()
1142 os << StringPrintf("%p Field: %s\n", field, PrettyField(field).c_str()); in PrettyObjectValue()
1145 os << StringPrintf("%p Method: %s\n", method, PrettyMethod(method).c_str()); in PrettyObjectValue()
1147 os << StringPrintf("%p %s\n", value, PrettyDescriptor(type).c_str()); in PrettyObjectValue()
1151 static void PrintField(std::ostream& os, mirror::ArtField* field, mirror::Object* obj) in PrintField() argument
1154 os << StringPrintf("%s: ", field->GetName()); in PrintField()
1160 os << StringPrintf("%" PRId64 " (0x%" PRIx64 ")\n", field->Get64(obj), field->Get64(obj)); in PrintField()
1162 os << StringPrintf("%f (%a)\n", field->GetDouble(obj), field->GetDouble(obj)); in PrintField()
1164 os << StringPrintf("%f (%a)\n", field->GetFloat(obj), field->GetFloat(obj)); in PrintField()
1167 os << StringPrintf("%d (0x%x)\n", field->Get32(obj), field->Get32(obj)); in PrintField()
1174 os << StringPrintf("null %s\n", PrettyDescriptor(descriptor).c_str()); in PrintField()
1181 PrettyObjectValue(os, field_type, value); in PrintField()
1183 os << StringPrintf("%p %s\n", value, PrettyDescriptor(descriptor).c_str()); in PrintField()
1189 static void DumpFields(std::ostream& os, mirror::Object* obj, mirror::Class* klass) in DumpFields() argument
1193 DumpFields(os, obj, super); in DumpFields()
1199 PrintField(os, field, obj); in DumpFields()
1253 std::ostream& os = *state->os_; in Callback() local
1256 os << StringPrintf("%p: %s length:%d\n", obj, PrettyDescriptor(obj_class).c_str(), in Callback()
1260 os << StringPrintf("%p: java.lang.Class \"%s\" (", obj, PrettyDescriptor(klass).c_str()) in Callback()
1263 os << StringPrintf("%p: java.lang.reflect.ArtField %s\n", obj, in Callback()
1266 os << StringPrintf("%p: java.lang.reflect.ArtMethod %s\n", obj, in Callback()
1269 os << StringPrintf("%p: java.lang.String %s\n", obj, in Callback()
1272 os << StringPrintf("%p: %s\n", obj, PrettyDescriptor(obj_class).c_str()); in Callback()
1274 Indenter indent_filter(os.rdbuf(), kIndentChar, kIndentBy1Count); in Callback()
1491 void DumpOutliers(std::ostream& os) in DumpOutliers()
1533 os << "\nBig methods (size > " << i << " standard deviations the norm):\n"; in DumpOutliers()
1536 os << PrettyMethod(method_outlier[j]) << " requires storage of " in DumpOutliers()
1546 os << "... skipped " << skipped_values in DumpOutliers()
1549 os << std::flush; in DumpOutliers()
1572 os << "\nLarge expansion methods (size > " << i in DumpOutliers()
1576 os << PrettyMethod(method_outlier[j]) << " expanded code by " in DumpOutliers()
1586 os << "... skipped " << skipped_values in DumpOutliers()
1589 os << "\n" << std::flush; in DumpOutliers()
1592 void Dump(std::ostream& os) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { in Dump()
1594 os << "art_file_bytes = " << PrettySize(file_bytes) << "\n\n" in Dump()
1596 Indenter indent_filter(os.rdbuf(), kIndentChar, kIndentBy1Count); in Dump()
1610 os << "object_bytes breakdown:\n"; in Dump()
1617 os << StringPrintf("%32s %8zd bytes %6zd instances " in Dump()
1623 os << "\n" << std::flush; in Dump()
1626 os << StringPrintf("oat_file_bytes = %8zd\n" in Dump()
1648 os << StringPrintf("%s = %zd (%2.0f%% of oat file bytes)\n", in Dump()
1653 os << "\n" << StringPrintf("gc_map_bytes = %7zd (%2.0f%% of oat file bytes)\n" in Dump()
1661 os << StringPrintf("dex_instruction_bytes = %zd\n", dex_instruction_bytes) in Dump()
1669 DumpOutliers(os); in Dump()
1708 std::ostream* os = &std::cout; in oatdump() local
1751 os = out.get(); in oatdump()
1785 bool success = oat_dumper.Dump(*os); in oatdump()
1830 ImageDumper image_dumper(os, *image_space, image_header, oat_dumper_options.release()); in oatdump()