Lines Matching defs:out

425   DCHECK_EQ(static_cast<off_t>(file_offset + relative_offset), out.Seek(0, kSeekCurrent)) \
429 DCHECK_EQ(static_cast<off_t>(file_offset + offset_), out.Seek(0, kSeekCurrent)) \
432 bool OatWriter::Write(OutputStream& out) {
433 const size_t file_offset = out.Seek(0, kSeekCurrent);
435 if (!out.WriteFully(oat_header_, sizeof(*oat_header_))) {
436 PLOG(ERROR) << "Failed to write oat header to " << out.GetLocation();
441 if (!out.WriteFully(image_file_location_.data(), image_file_location_.size())) {
442 PLOG(ERROR) << "Failed to write oat header image file location to " << out.GetLocation();
447 if (!WriteTables(out, file_offset)) {
448 LOG(ERROR) << "Failed to write oat tables to " << out.GetLocation();
452 size_t relative_offset = WriteCode(out, file_offset);
454 LOG(ERROR) << "Failed to write oat code to " << out.GetLocation();
458 relative_offset = WriteCodeDexFiles(out, file_offset, relative_offset);
460 LOG(ERROR) << "Failed to write oat code for dex files to " << out.GetLocation();
499 CHECK_EQ(file_offset + size_total, static_cast<uint32_t>(out.Seek(0, kSeekCurrent)));
503 CHECK_EQ(file_offset + size_, static_cast<uint32_t>(out.Seek(0, kSeekCurrent)));
509 bool OatWriter::WriteTables(OutputStream& out, const size_t file_offset) {
511 if (!oat_dex_files_[i]->Write(this, out, file_offset)) {
512 PLOG(ERROR) << "Failed to write oat dex information to " << out.GetLocation();
518 off_t actual_offset = out.Seek(expected_offset, kSeekSet);
526 if (!out.WriteFully(&dex_file->GetHeader(), dex_file->GetHeader().file_size_)) {
528 << " to " << out.GetLocation();
534 if (!oat_classes_[i]->Write(this, out, file_offset)) {
535 PLOG(ERROR) << "Failed to write oat methods information to " << out.GetLocation();
542 size_t OatWriter::WriteCode(OutputStream& out, const size_t file_offset) {
544 off_t new_offset = out.Seek(size_executable_offset_alignment_, kSeekCurrent);
548 << " Expected: " << expected_file_offset << " File: " << out.GetLocation();
559 out.Seek(alignment_padding, kSeekCurrent); \
561 if (!out.WriteFully(&(*field)[0], field->size())) { \
562 PLOG(ERROR) << "Failed to write " # field " to " << out.GetLocation(); \
582 size_t OatWriter::WriteCodeDexFiles(OutputStream& out,
589 relative_offset = WriteCodeDexFile(out, file_offset, relative_offset, oat_class_index,
598 size_t OatWriter::WriteCodeDexFile(OutputStream& out, const size_t file_offset,
604 relative_offset = WriteCodeClassDef(out, file_offset, relative_offset, oat_class_index,
614 const DexFile& dex_file, OutputStream& out) const {
616 << " to " << out.GetLocation();
619 size_t OatWriter::WriteCodeClassDef(OutputStream& out,
642 relative_offset = WriteCodeMethod(out, file_offset, relative_offset, oat_class_index,
652 relative_offset = WriteCodeMethod(out, file_offset, relative_offset, oat_class_index,
663 size_t OatWriter::WriteCodeMethod(OutputStream& out, const size_t file_offset,
679 off_t new_offset = out.Seek(aligned_code_delta, kSeekCurrent);
684 << " Expected: " << expected_offset << " File: " << out.GetLocation();
703 if (!out.WriteFully(&code_size, sizeof(code_size))) {
704 ReportWriteFailure("method code size", method_idx, dex_file, out);
710 if (!out.WriteFully(&code[0], code_size)) {
711 ReportWriteFailure("method code", method_idx, dex_file, out);
735 if (!out.WriteFully(&mapping_table[0], mapping_table_size)) {
736 ReportWriteFailure("mapping table", method_idx, dex_file, out);
759 if (!out.WriteFully(&vmap_table[0], vmap_table_size)) {
760 ReportWriteFailure("vmap table", method_idx, dex_file, out);
783 if (!out.WriteFully(&gc_map[0], gc_map_size)) {
784 ReportWriteFailure("GC map", method_idx, dex_file, out);
824 OutputStream& out,
827 if (!out.WriteFully(&dex_file_location_size_, sizeof(dex_file_location_size_))) {
828 PLOG(ERROR) << "Failed to write dex file location length to " << out.GetLocation();
832 if (!out.WriteFully(dex_file_location_data_, dex_file_location_size_)) {
833 PLOG(ERROR) << "Failed to write dex file location data to " << out.GetLocation();
837 if (!out.WriteFully(&dex_file_location_checksum_, sizeof(dex_file_location_checksum_))) {
838 PLOG(ERROR) << "Failed to write dex file location checksum to " << out.GetLocation();
842 if (!out.WriteFully(&dex_file_offset_, sizeof(dex_file_offset_))) {
843 PLOG(ERROR) << "Failed to write dex file offset to " << out.GetLocation();
847 if (!out.WriteFully(&methods_offsets_[0],
849 PLOG(ERROR) << "Failed to write methods offsets to " << out.GetLocation();
885 OutputStream& out,
888 if (!out.WriteFully(&status_, sizeof(status_))) {
889 PLOG(ERROR) << "Failed to write class status to " << out.GetLocation();
894 out.Seek(0, kSeekCurrent));
895 if (!out.WriteFully(&method_offsets_[0],
897 PLOG(ERROR) << "Failed to write method offsets to " << out.GetLocation();
903 out.Seek(0, kSeekCurrent));