Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 74) sorted by relevance

123

/art/runtime/base/unix_file/
Dmapped_file_test.cc60 void CleanUp(RandomAccessFile* file) OVERRIDE { in CleanUp() argument
61 if (file == nullptr) { in CleanUp()
64 MappedFile* f = ::art::down_cast<MappedFile*>(file); in CleanUp()
74 MappedFile file; in TEST_F() local
75 EXPECT_EQ(-1, file.Fd()); in TEST_F()
76 EXPECT_FALSE(file.IsOpened()); in TEST_F()
77 EXPECT_FALSE(file.IsMapped()); in TEST_F()
81 MappedFile file; in TEST_F() local
82 ASSERT_TRUE(file.Open(good_path_, MappedFile::kReadOnlyMode)); in TEST_F()
83 EXPECT_GE(file.Fd(), 0); in TEST_F()
[all …]
Dfd_file_test.cc44 FdFile file; in TEST_F() local
45 EXPECT_EQ(-1, file.Fd()); in TEST_F()
46 EXPECT_FALSE(file.IsOpened()); in TEST_F()
47 EXPECT_TRUE(file.GetPath().empty()); in TEST_F()
52 FdFile file; in TEST_F() local
53 ASSERT_TRUE(file.Open(good_path, O_CREAT | O_WRONLY)); in TEST_F()
54 EXPECT_GE(file.Fd(), 0); in TEST_F()
55 EXPECT_TRUE(file.IsOpened()); in TEST_F()
56 EXPECT_EQ(0, file.Flush()); in TEST_F()
57 EXPECT_EQ(0, file.Close()); in TEST_F()
[all …]
Drandom_access_file_test.h68 std::unique_ptr<RandomAccessFile> file(MakeTestFile()); in TestRead()
72 ASSERT_EQ(0, file->Read(buf, 0, 0)); in TestRead()
73 ASSERT_EQ(0, file->Read(buf, 123, 0)); in TestRead()
76 … ASSERT_EQ(content.size(), static_cast<uint64_t>(file->Write(content.data(), content.size(), 0))); in TestRead()
78 TestReadContent(content, file.get()); in TestRead()
80 CleanUp(file.get()); in TestRead()
83 void TestReadContent(const std::string& content, RandomAccessFile* file) { in TestReadContent() argument
87 ASSERT_EQ(-EINVAL, file->Read(buf.get(), 0, -123)); in TestReadContent()
90 ASSERT_EQ(content.size(), static_cast<uint64_t>(file->Read(buf.get(), buf_size, 0))); in TestReadContent()
96 ASSERT_EQ(short_request, static_cast<uint64_t>(file->Read(buf.get(), short_request, 0))); in TestReadContent()
[all …]
/art/runtime/
Ddex_instruction.cc136 std::string Instruction::DumpString(const DexFile* file) const { in DumpString()
164 if (file != NULL) { in DumpString()
167 … PrintableString(file->StringDataByIdx(string_idx)).c_str(), string_idx); in DumpString()
173 if (file != NULL) { in DumpString()
175 … os << opcode << " v" << static_cast<int>(VRegA_21c()) << ", " << PrettyType(type_idx, *file) in DumpString()
186 if (file != NULL) { in DumpString()
188 … << opcode << " v" << static_cast<int>(VRegA_21c()) << ", " << PrettyField(field_idx, *file, true) in DumpString()
199 if (file != NULL) { in DumpString()
201 …s << opcode << " v" << static_cast<int>(VRegA_21c()) << ", " << PrettyField(field_idx, *file, true) in DumpString()
224 if (file != NULL) { in DumpString()
[all …]
Ddex_file_verifier_test.cc113 std::unique_ptr<File> file(OS::CreateEmptyFile(location)); in OpenDexFileBase64() local
114 CHECK(file.get() != NULL); in OpenDexFileBase64()
115 if (!file->WriteFully(dex_bytes.get(), length)) { in OpenDexFileBase64()
118 if (file->FlushCloseOrErase() != 0) { in OpenDexFileBase64()
121 file.reset(); in OpenDexFileBase64()
178 std::unique_ptr<File> file(OS::CreateEmptyFile(location)); in FixChecksumAndOpen() local
179 CHECK(file.get() != NULL); in FixChecksumAndOpen()
180 if (!file->WriteFully(bytes, length)) { in FixChecksumAndOpen()
183 if (file->FlushCloseOrErase() != 0) { in FixChecksumAndOpen()
186 file.reset(); in FixChecksumAndOpen()
[all …]
Dzip_archive_test.cc44 std::unique_ptr<File> file(new File(tmp.GetFd(), tmp.GetFilename(), false)); in TEST_F() local
45 ASSERT_TRUE(file.get() != NULL); in TEST_F()
46 bool success = zip_entry->ExtractToFile(*file, &error_msg); in TEST_F()
49 file.reset(NULL); in TEST_F()
Dos_linux.cc44 std::unique_ptr<File> file(new File); in OpenFileWithFlags() local
45 if (!file->Open(name, flags, 0666)) { in OpenFileWithFlags()
48 return file.release(); in OpenFileWithFlags()
Doat_file.cc90 std::unique_ptr<File> file(OS::OpenFileForReading(filename.c_str())); in Open() local
91 if (file.get() == NULL) { in Open()
95 ret.reset(OpenElfFile(file.get(), location, requested_base, oat_file_begin, false, executable, in Open()
105 OatFile* OatFile::OpenWritable(File* file, const std::string& location, std::string* error_msg) { in OpenWritable() argument
107 return OpenElfFile(file, location, nullptr, nullptr, true, false, error_msg); in OpenWritable()
110 OatFile* OatFile::OpenReadable(File* file, const std::string& location, std::string* error_msg) { in OpenReadable() argument
112 return OpenElfFile(file, location, nullptr, nullptr, false, false, error_msg); in OpenReadable()
127 OatFile* OatFile::OpenElfFile(File* file, in OpenElfFile() argument
135 bool success = oat_file->ElfFileOpen(file, requested_base, oat_file_begin, writable, executable, in OpenElfFile()
195 bool OatFile::ElfFileOpen(File* file, byte* requested_base, uint8_t* oat_file_begin, in ElfFileOpen() argument
[all …]
Dmethod_reference.h28 MethodReference(const DexFile* file, uint32_t index) : dex_file(file), dex_method_index(index) { in MethodReference()
Dsignal_catcher.cc111 std::unique_ptr<File> file(new File(fd, stack_trace_file_, true)); in Output() local
112 bool success = file->WriteFully(s.data(), s.size()); in Output()
114 success = file->FlushCloseOrErase() == 0; in Output()
116 file->Erase(); in Output()
Ddex_file_test.cc144 std::unique_ptr<File> file(OS::CreateEmptyFile(location)); in OpenDexFileBase64() local
145 CHECK(file.get() != NULL); in OpenDexFileBase64()
146 if (!file->WriteFully(dex_bytes.get(), length)) { in OpenDexFileBase64()
149 if (file->FlushCloseOrErase() != 0) { in OpenDexFileBase64()
152 file.reset(); in OpenDexFileBase64()
360 ScratchFile file; in TEST_F() local
361 UniqueCPtr<const char[]> dex_location_real(realpath(file.GetFilename().c_str(), nullptr)); in TEST_F()
/art/tools/
Dart37 file="$1"
38 while [ -h "$file" ]; do
40 file="$(readlink "$file")"
42 echo "$file"
/art/compiler/
Dfile_output_stream.cc26 FileOutputStream::FileOutputStream(File* file) : OutputStream(file->GetPath()), file_(file) {} in FileOutputStream() argument
Delf_fixup.cc31 bool ElfFixup::Fixup(File* file, uintptr_t oat_data_begin) { in Fixup() argument
33 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, true, false, &error_msg)); in Fixup()
41 LOG(WARNING) << "Failed fo fixup .dynamic in " << file->GetPath(); in Fixup()
45 LOG(WARNING) << "Failed fo fixup section headers in " << file->GetPath(); in Fixup()
49 LOG(WARNING) << "Failed fo fixup program headers in " << file->GetPath(); in Fixup()
53 LOG(WARNING) << "Failed fo fixup .dynsym in " << file->GetPath(); in Fixup()
57 LOG(WARNING) << "Failed fo fixup .symtab in " << file->GetPath(); in Fixup()
61 LOG(WARNING) << "Failed fo fixup .rel.dyn in " << file->GetPath(); in Fixup()
Delf_writer_test.cc87 std::unique_ptr<File> file(OS::OpenFileForReading(elf_filename.c_str())); in TEST_F() local
88 ASSERT_TRUE(file.get() != NULL); in TEST_F()
91 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, false, &error_msg)); in TEST_F()
99 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, false, &error_msg)); in TEST_F()
107 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, true, &error_msg)); in TEST_F()
Delf_stripper.cc32 bool ElfStripper::Strip(File* file, std::string* error_msg) { in Strip() argument
33 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, true, false, error_msg)); in Strip()
129 int result = ftruncate(file->Fd(), offset); in Strip()
132 file->GetPath().c_str(), strerror(errno)); in Strip()
Delf_writer.cc41 void ElfWriter::GetOatElfInformation(File* file, in GetOatElfInformation() argument
45 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, false, false, &error_msg)); in GetOatElfInformation()
/art/runtime/base/
Dlogging.cc122 LogMessageData::LogMessageData(const char* file, int line, LogSeverity severity, int error) in LogMessageData() argument
123 : file(file), in LogMessageData()
127 const char* last_slash = strrchr(file, '/'); in LogMessageData()
128 file = (last_slash == NULL) ? file : last_slash + 1; in LogMessageData()
Dscoped_flock.cc64 bool ScopedFlock::Init(File* file, std::string* error_msg) { in Init() argument
65 file_.reset(new File(dup(file->Fd()), true)); in Init()
69 file->GetPath().c_str(), strerror(errno)); in Init()
74 …*error_msg = StringPrintf("Failed to lock file '%s': %s", file->GetPath().c_str(), strerror(errno)… in Init()
Dbit_vector.cc404 void BitVector::DumpDotHelper(bool last_entry, FILE* file, std::ostringstream& buffer) const { in DumpDotHelper() argument
406 fprintf(file, " {%s}", buffer.str().c_str()); in DumpDotHelper()
410 fprintf(file, "|"); in DumpDotHelper()
414 fprintf(file, "\\\n"); in DumpDotHelper()
417 void BitVector::DumpDot(FILE* file, const char* prefix, bool last_entry) const { in DumpDot() argument
420 DumpDotHelper(last_entry, file, buffer); in DumpDot()
423 void BitVector::DumpIndicesDot(FILE* file, const char* prefix, bool last_entry) const { in DumpIndicesDot() argument
426 DumpDotHelper(last_entry, file, buffer); in DumpIndicesDot()
/art/build/
DAndroid.gtest.mk246 $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_TARGET_GTEST_$(file)_DEX)) \
282 …t_exe) $$(ART_GTEST_$(1)_HOST_DEPS) $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_HOST_GTES…
291 …t_exe) $$(ART_GTEST_$(1)_HOST_DEPS) $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_HOST_GTES…
411 …$(foreach file,$(RUNTIME_GTEST_TARGET_SRC_FILES), $(eval $(call define-art-gtest,target,$(file),,)…
412 …$(foreach file,$(COMPILER_GTEST_TARGET_SRC_FILES), $(eval $(call define-art-gtest,target,$(file),a…
415 $(foreach file,$(RUNTIME_GTEST_HOST_SRC_FILES), $(eval $(call define-art-gtest,host,$(file),,)))
416 …$(foreach file,$(COMPILER_GTEST_HOST_SRC_FILES), $(eval $(call define-art-gtest,host,$(file),art/c…
421 $(foreach file, $(RUNTIME_GTEST_TARGET_SRC_FILES), $(eval RUNTIME_TARGET_GTEST_MAKE_TARGETS += $$(n…
423 $(foreach file, $(COMPILER_GTEST_TARGET_SRC_FILES), $(eval COMPILER_TARGET_GTEST_MAKE_TARGETS += $$…
DAndroid.oat.mk33 --image-classes=$$(PRELOADED_CLASSES) $$(addprefix --dex-file=,$$(HOST_CORE_DEX_FILES)) \
34 $$(addprefix --dex-location=,$$(HOST_CORE_DEX_LOCATIONS)) --oat-file=$$($(1)HOST_CORE_OAT_OUT) \
56 --image-classes=$$(PRELOADED_CLASSES) $$(addprefix --dex-file=,$$(TARGET_CORE_DEX_FILES)) \
57 …$$(addprefix --dex-location=,$$(TARGET_CORE_DEX_LOCATIONS)) --oat-file=$$($(1)TARGET_CORE_OAT_OUT)…
DAndroid.cpplint.mk49 $(foreach file, $(ART_CPPLINT_SRC), $(eval $(call declare-art-cpplint-target,$(file))))
/art/compiler/utils/
Dassembler_test.h410 std::string Objdump(std::string file) { in Objdump() argument
421 args.push_back(file); in Objdump()
423 args.push_back(file+".dump"); in Objdump()
435 std::ifstream dump(file+".dump"); in Objdump()
493 bool DisassembleBinary(std::string file, std::string* error_msg) { in DisassembleBinary() argument
497 args.push_back(file); in DisassembleBinary()
500 args.push_back(file+".dis"); in DisassembleBinary()
601 static bool FileExists(std::string file) { in FileExists() argument
602 if (file.length() == 0) { in FileExists()
607 size_t last_slash = file.find_last_of('/'); in FileExists()
[all …]
/art/test/098-ddmc/
Dexpected.txt2 …er of class name strings: 0 number of method name strings: 0 number of source file name strings: 0]
14 …er of class name strings: 0 number of method name strings: 0 number of source file name strings: 0]
23 …er of class name strings: 0 number of method name strings: 0 number of source file name strings: 0]

123