Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 48) sorted by relevance

12

/art/libartbase/base/
Dfile_magic.cc34 File fd(filename, O_RDONLY, /* check_usage */ false); in OpenAndReadMagic() local
35 if (fd.Fd() == -1) { in OpenAndReadMagic()
39 if (!ReadMagicAndReset(fd.Fd(), magic, error_msg)) { in OpenAndReadMagic()
43 return fd; in OpenAndReadMagic()
46 bool ReadMagicAndReset(int fd, uint32_t* magic, std::string* error_msg) { in ReadMagicAndReset() argument
47 int n = TEMP_FAILURE_RETRY(read(fd, magic, sizeof(*magic))); in ReadMagicAndReset()
52 if (lseek(fd, 0, SEEK_SET) != 0) { in ReadMagicAndReset()
Dscoped_flock.h57 static ScopedFlock DupOf(const int fd, const std::string& path,
71 LockedFile(int fd, const std::string& path, bool check_usage, bool read_only_mode) in LockedFile() argument
72 : FdFile(fd, path, check_usage, read_only_mode) { in LockedFile()
Dfile_magic.h31 bool ReadMagicAndReset(int fd, uint32_t* magic, std::string* error_msg);
Dscoped_flock.cc93 ScopedFlock LockedFile::DupOf(const int fd, const std::string& path, in DupOf() argument
101 new LockedFile(dup(fd), path, false /* check_usage */, read_only_mode)); in DupOf()
/art/openjdkjvm/
DOpenjdkJvm.cc85 int fd = TEMP_FAILURE_RETRY(open(fname, flags & ~JVM_O_DELETE, mode)); in JVM_Open() local
86 if (fd < 0) { in JVM_Open()
95 return fd; in JVM_Open()
99 JNIEXPORT jint JVM_Close(jint fd) { in JVM_Close() argument
101 return close(fd); in JVM_Close()
105 JNIEXPORT jint JVM_Read(jint fd, char* buf, jint nbytes) { in JVM_Read() argument
106 return TEMP_FAILURE_RETRY(read(fd, buf, nbytes)); in JVM_Read()
110 JNIEXPORT jint JVM_Write(jint fd, char* buf, jint nbytes) { in JVM_Write() argument
111 return TEMP_FAILURE_RETRY(write(fd, buf, nbytes)); in JVM_Write()
115 JNIEXPORT jlong JVM_Lseek(jint fd, jlong offset, jint whence) { in JVM_Lseek() argument
[all …]
/art/runtime/jdwp/
Djdwp_adb.cc353 int fd; in ProcessIncoming() local
358 fd = ControlSock(); in ProcessIncoming()
359 if (fd >= 0) { in ProcessIncoming()
360 FD_SET(fd, &readfds); in ProcessIncoming()
361 if (maxfd < fd) { in ProcessIncoming()
362 maxfd = fd; in ProcessIncoming()
365 fd = clientSock; in ProcessIncoming()
366 if (fd >= 0) { in ProcessIncoming()
367 FD_SET(fd, &readfds); in ProcessIncoming()
368 if (maxfd < fd) { in ProcessIncoming()
[all …]
Djdwp_socket.cc202 static int SetNoDelay(int fd) { in SetNoDelay() argument
204 int cc = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); in SetNoDelay()
390 int fd; in ProcessIncoming() local
395 fd = listenSock; in ProcessIncoming()
396 if (fd >= 0) { in ProcessIncoming()
397 FD_SET(fd, &readfds); in ProcessIncoming()
398 if (maxfd < fd) { in ProcessIncoming()
399 maxfd = fd; in ProcessIncoming()
402 fd = clientSock; in ProcessIncoming()
403 if (fd >= 0) { in ProcessIncoming()
[all …]
/art/libartbase/base/unix_file/
Dfd_file.h40 FdFile(int fd, bool checkUsage);
41 FdFile(int fd, const std::string& path, bool checkUsage);
42 FdFile(int fd, const std::string& path, bool checkUsage, bool read_only_mode);
71 void Reset(int fd, bool check_usage) { in Reset() argument
72 if (fd_ != -1 && fd_ != fd) { in Reset()
75 fd_ = fd; in Reset()
77 guard_state_ = fd == -1 ? GuardState::kNoCheck : GuardState::kBase; in Reset()
Dfd_file.cc43 FdFile::FdFile(int fd, bool check_usage) in FdFile() argument
45 fd_(fd), auto_close_(true), read_only_mode_(false) { in FdFile()
48 FdFile::FdFile(int fd, const std::string& path, bool check_usage) in FdFile() argument
49 : FdFile(fd, path, check_usage, false) { in FdFile()
52 FdFile::FdFile(int fd, const std::string& path, bool check_usage, bool read_only_mode) in FdFile() argument
54 fd_(fd), file_path_(path), auto_close_(true), read_only_mode_(read_only_mode) { in FdFile()
251 static ssize_t ReadIgnoreOffset(int fd, void *buf, size_t count, off_t offset) { in ReadIgnoreOffset() argument
253 return read(fd, buf, count); in ReadIgnoreOffset()
257 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { in ReadFullyGeneric() argument
260 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset)); in ReadFullyGeneric()
/art/runtime/dex/
Dart_dex_file_loader.cc94 File fd; in GetMultiDexChecksums() local
97 fd = File(zip_fd, false /* check_usage */); in GetMultiDexChecksums()
100 fd = OpenAndReadMagic(filename, &magic, error_msg); in GetMultiDexChecksums()
102 if (fd.Fd() == -1) { in GetMultiDexChecksums()
108 ZipArchive::OpenFromFd(fd.Release(), filename, error_msg)); in GetMultiDexChecksums()
142 std::unique_ptr<const DexFile> dex_file(OpenFile(fd.Release(), in GetMultiDexChecksums()
227 File fd = OpenAndReadMagic(filename, &magic, error_msg); in Open() local
228 if (fd.Fd() == -1) { in Open()
233 return OpenZip(fd.Release(), location, verify, verify_checksum, error_msg, dex_files); in Open()
236 std::unique_ptr<const DexFile> dex_file(OpenFile(fd.Release(), in Open()
[all …]
Dart_dex_file_loader.h83 std::unique_ptr<const DexFile> OpenDex(int fd,
91 bool OpenZip(int fd,
99 std::unique_ptr<const DexFile> OpenFile(int fd,
/art/runtime/
Dzip_archive.cc209 static void SetCloseOnExec(int fd) { in SetCloseOnExec() argument
211 int flags = fcntl(fd, F_GETFD); in SetCloseOnExec()
213 PLOG(WARNING) << "fcntl(" << fd << ", F_GETFD) failed"; in SetCloseOnExec()
216 int rc = fcntl(fd, F_SETFD, flags | FD_CLOEXEC); in SetCloseOnExec()
218 PLOG(WARNING) << "fcntl(" << fd << ", F_SETFD, " << flags << ") failed"; in SetCloseOnExec()
238 ZipArchive* ZipArchive::OpenFromFd(int fd, const char* filename, std::string* error_msg) { in OpenFromFd() argument
240 DCHECK_GT(fd, 0); in OpenFromFd()
243 const int32_t error = OpenArchiveFd(fd, filename, &handle); in OpenFromFd()
Dzip_archive_test.cc52 int fd = open(tmp.GetFilename().c_str(), O_RDONLY); in TEST_F() local
53 ASSERT_NE(-1, fd); in TEST_F()
57 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buf, kBufSize)); in TEST_F()
Dmonitor_android.cc46 int fd = open("/proc/self/cmdline", O_RDONLY); in LogContentionEvent() local
49 read(fd, procName, sizeof(procName) - 1); in LogContentionEvent()
50 close(fd); in LogContentionEvent()
Dmem_map.h116 int fd, in MapFile() argument
125 fd, in MapFile()
145 int fd,
255 int fd,
262 int fd,
Dmem_map.cc278 int fd, in TryMemMapLow4GB() argument
280 void* actual = mmap(ptr, page_aligned_byte_count, prot, flags, fd, offset); in TryMemMapLow4GB()
332 unique_fd fd; in MapAnonymous() local
340 fd.reset(ashmem_create_region(debug_friendly_name.c_str(), page_aligned_byte_count)); in MapAnonymous()
342 if (fd.get() == -1) { in MapAnonymous()
362 fd.get(), in MapAnonymous()
379 fd.get(), in MapAnonymous()
488 int fd, in MapFileAtAddress() argument
536 fd, in MapFileAtAddress()
549 page_aligned_expected, page_aligned_byte_count, prot, flags, fd, in MapFileAtAddress()
[all …]
/art/compiler/utils/mips64/
Dassembler_mips64.cc164 void Mips64Assembler::EmitFR(int opcode, int fmt, FpuRegister ft, FpuRegister fs, FpuRegister fd, in EmitFR() argument
168 CHECK_NE(fd, kNoFpuRegister); in EmitFR()
173 static_cast<uint32_t>(fd) << kFdShift | in EmitFR()
977 void Mips64Assembler::AddS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in AddS() argument
978 EmitFR(0x11, 0x10, ft, fs, fd, 0x0); in AddS()
981 void Mips64Assembler::SubS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in SubS() argument
982 EmitFR(0x11, 0x10, ft, fs, fd, 0x1); in SubS()
985 void Mips64Assembler::MulS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in MulS() argument
986 EmitFR(0x11, 0x10, ft, fs, fd, 0x2); in MulS()
989 void Mips64Assembler::DivS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in DivS() argument
[all …]
Dassembler_mips64.h580 void AddS(FpuRegister fd, FpuRegister fs, FpuRegister ft);
581 void SubS(FpuRegister fd, FpuRegister fs, FpuRegister ft);
582 void MulS(FpuRegister fd, FpuRegister fs, FpuRegister ft);
583 void DivS(FpuRegister fd, FpuRegister fs, FpuRegister ft);
584 void AddD(FpuRegister fd, FpuRegister fs, FpuRegister ft);
585 void SubD(FpuRegister fd, FpuRegister fs, FpuRegister ft);
586 void MulD(FpuRegister fd, FpuRegister fs, FpuRegister ft);
587 void DivD(FpuRegister fd, FpuRegister fs, FpuRegister ft);
588 void SqrtS(FpuRegister fd, FpuRegister fs);
589 void SqrtD(FpuRegister fd, FpuRegister fs);
[all …]
/art/compiler/utils/mips/
Dassembler_mips.cc306 FRegister fd, in EmitFR() argument
310 CHECK_NE(fd, kNoFRegister); in EmitFR()
315 static_cast<uint32_t>(fd) << kFdShift | in EmitFR()
1226 void MipsAssembler::AddS(FRegister fd, FRegister fs, FRegister ft) { in AddS() argument
1227 DsFsmInstr(EmitFR(0x11, 0x10, ft, fs, fd, 0x0)).FprOuts(fd).FprIns(fs, ft); in AddS()
1230 void MipsAssembler::SubS(FRegister fd, FRegister fs, FRegister ft) { in SubS() argument
1231 DsFsmInstr(EmitFR(0x11, 0x10, ft, fs, fd, 0x1)).FprOuts(fd).FprIns(fs, ft); in SubS()
1234 void MipsAssembler::MulS(FRegister fd, FRegister fs, FRegister ft) { in MulS() argument
1235 DsFsmInstr(EmitFR(0x11, 0x10, ft, fs, fd, 0x2)).FprOuts(fd).FprIns(fs, ft); in MulS()
1238 void MipsAssembler::DivS(FRegister fd, FRegister fs, FRegister ft) { in DivS() argument
[all …]
Dassembler_mips.h439 void AddS(FRegister fd, FRegister fs, FRegister ft);
440 void SubS(FRegister fd, FRegister fs, FRegister ft);
441 void MulS(FRegister fd, FRegister fs, FRegister ft);
442 void DivS(FRegister fd, FRegister fs, FRegister ft);
443 void AddD(FRegister fd, FRegister fs, FRegister ft);
444 void SubD(FRegister fd, FRegister fs, FRegister ft);
445 void MulD(FRegister fd, FRegister fs, FRegister ft);
446 void DivD(FRegister fd, FRegister fs, FRegister ft);
447 void SqrtS(FRegister fd, FRegister fs);
448 void SqrtD(FRegister fd, FRegister fs);
[all …]
/art/profman/
Dprofman.cc71 static bool FdIsValid(int fd) { in FdIsValid() argument
72 return fd != kInvalidFd; in FdIsValid()
473 std::unique_ptr<const ProfileCompilationInfo> LoadProfile(const std::string& filename, int fd) { in LoadProfile() argument
475 fd = open(filename.c_str(), O_RDWR); in LoadProfile()
476 if (fd < 0) { in LoadProfile()
482 if (!info->Load(fd)) { in LoadProfile()
483 LOG(ERROR) << "Cannot load profile info from fd=" << fd << "\n"; in LoadProfile()
491 int fd, in DumpOneProfile() argument
494 std::unique_ptr<const ProfileCompilationInfo> info(LoadProfile(filename, fd)); in DumpOneProfile()
496 LOG(ERROR) << "Cannot load profile info from filename=" << filename << " fd=" << fd; in DumpOneProfile()
[all …]
/art/runtime/jit/
Dprofile_compilation_info.h319 int fd,
347 bool Save(int fd);
405 static bool GenerateTestProfile(int fd,
413 static bool GenerateTestProfile(int fd,
429 bool IsProfileFile(int fd);
634 static ProfileSource* Create(int32_t fd) { in Create() argument
635 DCHECK_GT(fd, -1); in Create()
636 return new ProfileSource(fd, /*map*/ nullptr); in Create()
663 ProfileSource(int32_t fd, std::unique_ptr<MemMap>&& mem_map) in ProfileSource() argument
664 : fd_(fd), mem_map_(std::move(mem_map)), mem_map_cur_(0) {} in ProfileSource()
[all …]
Dprofile_compilation_info.cc199 int fd = profile_file->Fd(); in MergeWith() local
201 ProfileLoadStatus status = LoadInternal(fd, &error); in MergeWith()
230 int fd = profile_file->Fd(); in Load() local
232 ProfileLoadStatus status = LoadInternal(fd, &error); in Load()
267 int fd = profile_file->Fd(); in Save() local
277 bool result = Save(fd); in Save()
295 static bool WriteBuffer(int fd, const uint8_t* buffer, size_t byte_count) { in WriteBuffer() argument
297 int bytes_written = TEMP_FAILURE_RETRY(write(fd, buffer, byte_count)); in WriteBuffer()
346 bool ProfileCompilationInfo::Save(int fd) { in Save() argument
349 DCHECK_GE(fd, 0); in Save()
[all …]
/art/compiler/utils/
Dswap_space_test.cc38 int fd = scratch.GetFd(); in SwapTest() local
41 SwapSpace pool(fd, 1 * MB); in SwapTest()
/art/runtime/hprof/
Dhprof.h24 void DumpHeap(const char* filename, int fd, bool direct_to_ddms);

12