Lines Matching refs:os
354 bool Dump(std::ostream& os) { in Dump() argument
358 os << "MAGIC:\n"; in Dump()
359 os << oat_header.GetMagic() << "\n\n"; in Dump()
361 os << "LOCATION:\n"; in Dump()
362 os << oat_file_.GetLocation() << "\n\n"; in Dump()
364 os << "CHECKSUM:\n"; in Dump()
365 os << StringPrintf("0x%08x\n\n", oat_header.GetChecksum()); in Dump()
367 os << "INSTRUCTION SET:\n"; in Dump()
368 os << oat_header.GetInstructionSet() << "\n\n"; in Dump()
374 os << "INSTRUCTION SET FEATURES:\n"; in Dump()
375 os << features->GetFeatureString() << "\n\n"; in Dump()
378 os << "DEX FILE COUNT:\n"; in Dump()
379 os << oat_header.GetDexFileCount() << "\n\n"; in Dump()
382 os << label " OFFSET:\n"; \ in Dump()
383 os << StringPrintf("0x%08x", oat_header.offset()); \ in Dump()
385 os << StringPrintf(" (%p)", oat_file_.Begin() + oat_header.offset()); \ in Dump()
387 os << StringPrintf("\n\n"); in Dump()
406 os << "IMAGE PATCH DELTA:\n"; in Dump()
407 os << StringPrintf("%d (0x%08x)\n\n", in Dump()
411 os << "IMAGE FILE LOCATION OAT CHECKSUM:\n"; in Dump()
412 os << StringPrintf("0x%08x\n\n", oat_header.GetImageFileLocationOatChecksum()); in Dump()
414 os << "IMAGE FILE LOCATION OAT BEGIN:\n"; in Dump()
415 os << StringPrintf("0x%08x\n\n", oat_header.GetImageFileLocationOatDataBegin()); in Dump()
419 os << "KEY VALUE STORE:\n"; in Dump()
424 os << key << " = " << value << "\n"; in Dump()
427 os << "\n"; in Dump()
431 os << "BEGIN:\n"; in Dump()
432 os << reinterpret_cast<const void*>(oat_file_.Begin()) << "\n\n"; in Dump()
434 os << "END:\n"; in Dump()
435 os << reinterpret_cast<const void*>(oat_file_.End()) << "\n\n"; in Dump()
438 os << "SIZE:\n"; in Dump()
439 os << oat_file_.Size() << "\n\n"; in Dump()
441 os << std::flush; in Dump()
446 os << "SEARCH ADDRESS (executable offset + input):\n"; in Dump()
447 os << StringPrintf("0x%08x\n\n", resolved_addr2instr_); in Dump()
457 if (!ExportDexFile(os, *oat_dex_file)) { in Dump()
461 if (!DumpOatDexFile(os, *oat_dex_file)) { in Dump()
468 os << std::flush; in Dump()
571 bool DumpOatDexFile(std::ostream& os, const OatFile::OatDexFile& oat_dex_file) { in DumpOatDexFile() argument
574 os << "OatDexFile:\n"; in DumpOatDexFile()
575 os << StringPrintf("location: %s\n", oat_dex_file.GetDexFileLocation().c_str()); in DumpOatDexFile()
576 os << StringPrintf("checksum: 0x%08x\n", oat_dex_file.GetDexFileLocationChecksum()); in DumpOatDexFile()
582 os << StringPrintf("dex-file: 0x%08x..0x%08x\n", in DumpOatDexFile()
590 os << "NOT FOUND: " << error_msg << "\n\n"; in DumpOatDexFile()
591 os << std::flush; in DumpOatDexFile()
600 os << StringPrintf("type-table: 0x%08x..0x%08x\n", in DumpOatDexFile()
605 VariableIndentationOutputStream vios(&os); in DumpOatDexFile()
620 os << StringPrintf("%zd: %s (offset=0x%08x) (type_idx=%d)", in DumpOatDexFile()
630 os << std::flush; in DumpOatDexFile()
635 os << std::flush; in DumpOatDexFile()
639 bool ExportDexFile(std::ostream& os, const OatFile::OatDexFile& oat_dex_file) { in ExportDexFile() argument
645 os << "Failed to open dex file '" << dex_file_location << "': " << error_msg; in ExportDexFile()
652 os << "Invalid dex file\n"; in ExportDexFile()
659 os << options_.export_dex_location_ << " output directory not found or symlink\n"; in ExportDexFile()
696 os << "Failed to open output dex file " << out_dex_path; in ExportDexFile()
701 os << "Failed to write dex file"; in ExportDexFile()
707 os << "Flush and close failed"; in ExportDexFile()
711 os << StringPrintf("Dex file exported at %s (%zd bytes)\n", out_dex_path.c_str(), fsize); in ExportDexFile()
712 os << std::flush; in ExportDexFile()
975 void DumpSpillMask(std::ostream& os, uint32_t spill_mask, bool is_float) { in DumpSpillMask() argument
979 os << "("; in DumpSpillMask()
983 os << "fr" << i; in DumpSpillMask()
985 os << "r" << i; in DumpSpillMask()
989 os << ", "; in DumpSpillMask()
995 os << ")"; in DumpSpillMask()
1032 void DumpVregLocations(std::ostream& os, const OatFile::OatMethod& oat_method, in DumpVregLocations() argument
1040 os << "vr_stack_locations:"; in DumpVregLocations()
1044 os << "\n\tmethod*:"; in DumpVregLocations()
1046 os << "\n\tins:"; in DumpVregLocations()
1048 os << "\n\tlocals:"; in DumpVregLocations()
1058 os << " v" << reg << "[sp + #" << offset << "]"; in DumpVregLocations()
1063 os << "\n\touts:"; in DumpVregLocations()
1067 os << " v" << out_reg << "[sp + #" << offset << "]"; in DumpVregLocations()
1070 os << "\n"; in DumpVregLocations()
1074 void DumpDexCode(std::ostream& os, const DexFile& dex_file, const DexFile::CodeItem* code_item) { in DumpDexCode() argument
1079 os << StringPrintf("0x%04zx: ", i) << instruction->DumpHexLE(5) in DumpDexCode()
1270 ImageDumper(std::ostream* os, in ImageDumper() argument
1274 : os_(os), in ImageDumper()
1275 vios_(os), in ImageDumper()
1282 std::ostream& os = *os_; in Dump() local
1285 os << "MAGIC: " << image_header_.GetMagic() << "\n\n"; in Dump()
1287 os << "IMAGE LOCATION: " << image_space_.GetImageLocation() << "\n\n"; in Dump()
1289 os << "IMAGE BEGIN: " << reinterpret_cast<void*>(image_header_.GetImageBegin()) << "\n\n"; in Dump()
1291 os << "IMAGE SIZE: " << image_header_.GetImageSize() << "\n\n"; in Dump()
1295 os << "IMAGE SECTION " << section << ": " << image_header_.GetImageSection(section) << "\n\n"; in Dump()
1298 os << "OAT CHECKSUM: " << StringPrintf("0x%08x\n\n", image_header_.GetOatChecksum()); in Dump()
1300 os << "OAT FILE BEGIN:" << reinterpret_cast<void*>(image_header_.GetOatFileBegin()) << "\n\n"; in Dump()
1302 os << "OAT DATA BEGIN:" << reinterpret_cast<void*>(image_header_.GetOatDataBegin()) << "\n\n"; in Dump()
1304 os << "OAT DATA END:" << reinterpret_cast<void*>(image_header_.GetOatDataEnd()) << "\n\n"; in Dump()
1306 os << "OAT FILE END:" << reinterpret_cast<void*>(image_header_.GetOatFileEnd()) << "\n\n"; in Dump()
1308 os << "PATCH DELTA:" << image_header_.GetPatchDelta() << "\n\n"; in Dump()
1310 os << "COMPILE PIC: " << (image_header_.CompilePic() ? "yes" : "no") << "\n\n"; in Dump()
1313 os << "ROOTS: " << reinterpret_cast<void*>(image_header_.GetImageRoots()) << "\n"; in Dump()
1352 os << "METHOD ROOTS\n"; in Dump()
1362 os << "\n"; in Dump()
1368 os << "OAT LOCATION: " << oat_location; in Dump()
1369 os << "\n"; in Dump()
1386 os << "OAT FILE NOT FOUND: " << error_msg << "\n"; in Dump()
1389 os << "\n"; in Dump()
1401 os << "OBJECTS:\n" << std::flush; in Dump()
1445 os << "STATS:\n" << std::flush; in Dump()
1515 stats_.Dump(os, indent_os); in Dump()
1516 os << "\n"; in Dump()
1518 os << std::flush; in Dump()
1520 return oat_dumper_->Dump(os); in Dump()
1539 static void PrettyObjectValue(std::ostream& os, mirror::Class* type, mirror::Object* value) in PrettyObjectValue() argument
1543 os << StringPrintf("null %s\n", PrettyDescriptor(type).c_str()); in PrettyObjectValue()
1546 os << StringPrintf("%p String: %s\n", string, in PrettyObjectValue()
1550 os << StringPrintf("%p Class: %s\n", klass, PrettyDescriptor(klass).c_str()); in PrettyObjectValue()
1552 os << StringPrintf("%p %s\n", value, PrettyDescriptor(type).c_str()); in PrettyObjectValue()
1556 static void PrintField(std::ostream& os, ArtField* field, mirror::Object* obj) in PrintField() argument
1558 os << StringPrintf("%s: ", field->GetName()); in PrintField()
1561 os << StringPrintf("%" PRId64 " (0x%" PRIx64 ")\n", field->Get64(obj), field->Get64(obj)); in PrintField()
1564 os << StringPrintf("%f (%a)\n", field->GetDouble(obj), field->GetDouble(obj)); in PrintField()
1567 os << StringPrintf("%f (%a)\n", field->GetFloat(obj), field->GetFloat(obj)); in PrintField()
1570 os << StringPrintf("%d (0x%x)\n", field->Get32(obj), field->Get32(obj)); in PrintField()
1573 os << StringPrintf("%u (0x%x)\n", field->GetChar(obj), field->GetChar(obj)); in PrintField()
1576 os << StringPrintf("%d (0x%x)\n", field->GetShort(obj), field->GetShort(obj)); in PrintField()
1579 os << StringPrintf("%s (0x%x)\n", field->GetBoolean(obj)? "true" : "false", in PrintField()
1583 os << StringPrintf("%d (0x%x)\n", field->GetByte(obj), field->GetByte(obj)); in PrintField()
1590 os << StringPrintf("null %s\n", PrettyDescriptor(field->GetTypeDescriptor()).c_str()); in PrintField()
1595 PrettyObjectValue(os, field_type, value); in PrintField()
1597 os << StringPrintf("%p %s\n", value, in PrintField()
1604 os << "unexpected field type: " << field->GetTypeDescriptor() << "\n"; in PrintField()
1609 static void DumpFields(std::ostream& os, mirror::Object* obj, mirror::Class* klass) in DumpFields() argument
1613 DumpFields(os, obj, super); in DumpFields()
1616 PrintField(os, &field, obj); in DumpFields()
1667 std::ostream& os = state->vios_.Stream(); in Callback() local
1671 os << StringPrintf("%p: %s length:%d\n", obj, PrettyDescriptor(obj_class).c_str(), in Callback()
1675 os << StringPrintf("%p: java.lang.Class \"%s\" (", obj, PrettyDescriptor(klass).c_str()) in Callback()
1678 os << StringPrintf("%p: java.lang.String %s\n", obj, in Callback()
1681 os << StringPrintf("%p: %s\n", obj, PrettyDescriptor(obj_class).c_str()); in Callback()
1684 DumpFields(os, obj, obj_class); in Callback()
1699 os << StringPrintf("%d: ", i); in Callback()
1701 os << StringPrintf("%d to %zd: ", i, i + run); in Callback()
1706 PrettyObjectValue(os, value_class, value); in Callback()
1711 os << "STATICS:\n"; in Callback()
1714 PrintField(os, &field, field.GetDeclaringClass()); in Callback()
1726 os << "Methods (size=" << num_methods << "):"; in Callback()
1740 os << StringPrintf("%zd: ", i); in Callback()
1742 os << StringPrintf("%zd to %zd: ", i, i + run); in Callback()
1754 os << StringPrintf("%p %s\n", elem, msg.c_str()); in Callback()
1759 os << "Fields (size=" << num_fields << "):"; in Callback()
1771 os << StringPrintf("%zd: ", i); in Callback()
1773 os << StringPrintf("%zd to %zd: ", i, i + run); in Callback()
1785 os << StringPrintf("%p %s\n", elem, msg.c_str()); in Callback()
1974 void DumpOutliers(std::ostream& os) in DumpOutliers()
2019 os << "\nBig methods (size > " << i << " standard deviations the norm):\n"; in DumpOutliers()
2022 os << PrettyMethod(method_outlier[j]) << " requires storage of " in DumpOutliers()
2032 os << "... skipped " << skipped_values in DumpOutliers()
2035 os << std::flush; in DumpOutliers()
2058 os << "\nLarge expansion methods (size > " << i in DumpOutliers()
2062 os << PrettyMethod(method_outlier[j]) << " expanded code by " in DumpOutliers()
2072 os << "... skipped " << skipped_values in DumpOutliers()
2075 os << "\n" << std::flush; in DumpOutliers()
2078 void Dump(std::ostream& os, std::ostream& indent_os) in Dump()
2081 os << "art_file_bytes = " << PrettySize(file_bytes) << "\n\n" in Dump()
2110 os << "object_bytes breakdown:\n"; in Dump()
2117 os << StringPrintf("%32s %8zd bytes %6zd instances " in Dump()
2123 os << "\n" << std::flush; in Dump()
2126 os << StringPrintf("oat_file_bytes = %8zd\n" in Dump()
2148 os << StringPrintf("%s = %zd (%2.0f%% of oat file bytes)\n", in Dump()
2153 os << "\n" << StringPrintf("vmap_table_bytes = %7zd (%2.0f%% of oat file bytes)\n\n", in Dump()
2157 os << StringPrintf("dex_instruction_bytes = %zd\n", dex_instruction_bytes) in Dump()
2165 DumpOutliers(os); in Dump()
2196 std::ostream* os) SHARED_REQUIRES(Locks::mutator_lock_) { in DumpImage() argument
2202 ImageDumper image_dumper(os, *image_space, image_header, options); in DumpImage()
2209 static int DumpImages(Runtime* runtime, OatDumperOptions* options, std::ostream* os) { in DumpImages() argument
2249 int result = DumpImage(space.get(), options, os); in DumpImages()
2259 int result = DumpImage(image_space, options, os); in DumpImages()
2268 std::ostream* os) { in DumpOatWithRuntime() argument
2300 bool success = oat_dumper.Dump(*os); in DumpOatWithRuntime()
2304 static int DumpOatWithoutRuntime(OatFile* oat_file, OatDumperOptions* options, std::ostream* os) { in DumpOatWithoutRuntime() argument
2311 bool success = oat_dumper.Dump(*os); in DumpOatWithoutRuntime()
2316 std::ostream* os) { in DumpOat() argument
2332 return DumpOatWithRuntime(runtime, oat_file, options, os); in DumpOat()
2334 return DumpOatWithoutRuntime(oat_file, options, os); in DumpOat()