Home
last modified time | relevance | path

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

12

/art/runtime/openjdkjvm/
DOpenjdkJvm.cc84 int fd = TEMP_FAILURE_RETRY(open(fname, flags & ~JVM_O_DELETE, mode)); in JVM_Open() local
85 if (fd < 0) { in JVM_Open()
94 return fd; in JVM_Open()
98 JNIEXPORT jint JVM_Close(jint fd) { in JVM_Close() argument
100 return close(fd); in JVM_Close()
104 JNIEXPORT jint JVM_Read(jint fd, char* buf, jint nbytes) { in JVM_Read() argument
105 return TEMP_FAILURE_RETRY(read(fd, buf, nbytes)); in JVM_Read()
109 JNIEXPORT jint JVM_Write(jint fd, char* buf, jint nbytes) { in JVM_Write() argument
110 return TEMP_FAILURE_RETRY(write(fd, buf, nbytes)); in JVM_Write()
114 JNIEXPORT jlong JVM_Lseek(jint fd, jlong offset, jint whence) { in JVM_Lseek() argument
[all …]
/art/runtime/base/
Dfile_magic.cc35 File fd(filename, O_RDONLY, /* check_usage */ false); in OpenAndReadMagic() local
36 if (fd.Fd() == -1) { in OpenAndReadMagic()
40 int n = TEMP_FAILURE_RETRY(read(fd.Fd(), magic, sizeof(*magic))); in OpenAndReadMagic()
45 if (lseek(fd.Fd(), 0, SEEK_SET) != 0) { in OpenAndReadMagic()
50 return fd; in OpenAndReadMagic()
Dscoped_flock.h58 static ScopedFlock DupOf(const int fd, const std::string& path,
72 LockedFile(int fd, const std::string& path, bool check_usage, bool read_only_mode) in LockedFile() argument
73 : FdFile(fd, path, check_usage, read_only_mode) { in LockedFile()
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/runtime/jdwp/
Djdwp_adb.cc356 int fd; in ProcessIncoming() local
361 fd = ControlSock(); in ProcessIncoming()
362 if (fd >= 0) { in ProcessIncoming()
363 FD_SET(fd, &readfds); in ProcessIncoming()
364 if (maxfd < fd) { in ProcessIncoming()
365 maxfd = fd; in ProcessIncoming()
368 fd = clientSock; in ProcessIncoming()
369 if (fd >= 0) { in ProcessIncoming()
370 FD_SET(fd, &readfds); in ProcessIncoming()
371 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/runtime/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.cc42 FdFile::FdFile(int fd, bool check_usage) in FdFile() argument
44 fd_(fd), auto_close_(true), read_only_mode_(false) { in FdFile()
47 FdFile::FdFile(int fd, const std::string& path, bool check_usage) in FdFile() argument
48 : FdFile(fd, path, check_usage, false) { in FdFile()
51 FdFile::FdFile(int fd, const std::string& path, bool check_usage, bool read_only_mode) in FdFile() argument
53 fd_(fd), file_path_(path), auto_close_(true), read_only_mode_(read_only_mode) { in FdFile()
245 static ssize_t ReadIgnoreOffset(int fd, void *buf, size_t count, off_t offset) { in ReadIgnoreOffset() argument
247 return read(fd, buf, count); in ReadIgnoreOffset()
251 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { in ReadFullyGeneric() argument
254 ssize_t bytes_read = TEMP_FAILURE_RETRY(read_func(fd, ptr, byte_count, offset)); in ReadFullyGeneric()
/art/compiler/utils/mips/
Dassembler_mips.cc382 FRegister fd, in EmitFR() argument
386 CHECK_NE(fd, kNoFRegister); in EmitFR()
391 static_cast<uint32_t>(fd) << kFdShift | in EmitFR()
1258 void MipsAssembler::AddS(FRegister fd, FRegister fs, FRegister ft) { in AddS() argument
1259 DsFsmInstrFff(EmitFR(0x11, 0x10, ft, fs, fd, 0x0), fd, fs, ft); in AddS()
1262 void MipsAssembler::SubS(FRegister fd, FRegister fs, FRegister ft) { in SubS() argument
1263 DsFsmInstrFff(EmitFR(0x11, 0x10, ft, fs, fd, 0x1), fd, fs, ft); in SubS()
1266 void MipsAssembler::MulS(FRegister fd, FRegister fs, FRegister ft) { in MulS() argument
1267 DsFsmInstrFff(EmitFR(0x11, 0x10, ft, fs, fd, 0x2), fd, fs, ft); in MulS()
1270 void MipsAssembler::DivS(FRegister fd, FRegister fs, FRegister ft) { in DivS() argument
[all …]
Dassembler_mips.h353 void AddS(FRegister fd, FRegister fs, FRegister ft);
354 void SubS(FRegister fd, FRegister fs, FRegister ft);
355 void MulS(FRegister fd, FRegister fs, FRegister ft);
356 void DivS(FRegister fd, FRegister fs, FRegister ft);
357 void AddD(FRegister fd, FRegister fs, FRegister ft);
358 void SubD(FRegister fd, FRegister fs, FRegister ft);
359 void MulD(FRegister fd, FRegister fs, FRegister ft);
360 void DivD(FRegister fd, FRegister fs, FRegister ft);
361 void SqrtS(FRegister fd, FRegister fs);
362 void SqrtD(FRegister fd, FRegister fs);
[all …]
/art/runtime/
Dzip_archive.cc191 static void SetCloseOnExec(int fd) { in SetCloseOnExec() argument
193 int flags = fcntl(fd, F_GETFD); in SetCloseOnExec()
195 PLOG(WARNING) << "fcntl(" << fd << ", F_GETFD) failed"; in SetCloseOnExec()
198 int rc = fcntl(fd, F_SETFD, flags | FD_CLOEXEC); in SetCloseOnExec()
200 PLOG(WARNING) << "fcntl(" << fd << ", F_SETFD, " << flags << ") failed"; in SetCloseOnExec()
220 ZipArchive* ZipArchive::OpenFromFd(int fd, const char* filename, std::string* error_msg) { in OpenFromFd() argument
222 DCHECK_GT(fd, 0); in OpenFromFd()
225 const int32_t error = OpenArchiveFd(fd, filename, &handle); in OpenFromFd()
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()
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()
Dmem_map.h86 int fd, in MapFile() argument
95 fd, in MapFile()
115 int fd,
225 int fd,
232 int fd,
Dmem_map.cc274 int fd, in TryMemMapLow4GB() argument
276 void* actual = mmap(ptr, page_aligned_byte_count, prot, flags, fd, offset); in TryMemMapLow4GB()
328 unique_fd fd; in MapAnonymous() local
336 fd.reset(ashmem_create_region(debug_friendly_name.c_str(), page_aligned_byte_count)); in MapAnonymous()
338 if (fd.get() == -1) { in MapAnonymous()
358 fd.get(), in MapAnonymous()
375 fd.get(), in MapAnonymous()
399 int fd, in MapFileAtAddress() argument
447 fd, in MapFileAtAddress()
460 page_aligned_expected, page_aligned_byte_count, prot, flags, fd, in MapFileAtAddress()
[all …]
Dsignal_catcher.cc133 int fd = open(stack_trace_file_.c_str(), O_APPEND | O_CREAT | O_WRONLY, 0666); in OpenStackTraceFile() local
134 if (fd == -1) { in OpenStackTraceFile()
139 output_fd->reset(fd); in OpenStackTraceFile()
Ddex_file.cc90 File fd = OpenAndReadMagic(filename, &magic, error_msg); in GetMultiDexChecksums() local
91 if (fd.Fd() == -1) { in GetMultiDexChecksums()
97 ZipArchive::OpenFromFd(fd.Release(), filename, error_msg)); in GetMultiDexChecksums()
122 DexFile::OpenFile(fd.Release(), filename, false, false, error_msg)); in GetMultiDexChecksums()
221 File fd = OpenAndReadMagic(filename, &magic, error_msg); in Open() local
222 if (fd.Fd() == -1) { in Open()
227 return DexFile::OpenZip(fd.Release(), location, verify_checksum, error_msg, dex_files); in Open()
230 std::unique_ptr<const DexFile> dex_file(DexFile::OpenFile(fd.Release(), in Open()
246 std::unique_ptr<const DexFile> DexFile::OpenDex(int fd, in OpenDex() argument
251 return OpenFile(fd, location, true /* verify */, verify_checksum, error_msg); in OpenDex()
[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()
865 void Mips64Assembler::AddS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in AddS() argument
866 EmitFR(0x11, 0x10, ft, fs, fd, 0x0); in AddS()
869 void Mips64Assembler::SubS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in SubS() argument
870 EmitFR(0x11, 0x10, ft, fs, fd, 0x1); in SubS()
873 void Mips64Assembler::MulS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in MulS() argument
874 EmitFR(0x11, 0x10, ft, fs, fd, 0x2); in MulS()
877 void Mips64Assembler::DivS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in DivS() argument
[all …]
Dassembler_mips64.h567 void AddS(FpuRegister fd, FpuRegister fs, FpuRegister ft);
568 void SubS(FpuRegister fd, FpuRegister fs, FpuRegister ft);
569 void MulS(FpuRegister fd, FpuRegister fs, FpuRegister ft);
570 void DivS(FpuRegister fd, FpuRegister fs, FpuRegister ft);
571 void AddD(FpuRegister fd, FpuRegister fs, FpuRegister ft);
572 void SubD(FpuRegister fd, FpuRegister fs, FpuRegister ft);
573 void MulD(FpuRegister fd, FpuRegister fs, FpuRegister ft);
574 void DivD(FpuRegister fd, FpuRegister fs, FpuRegister ft);
575 void SqrtS(FpuRegister fd, FpuRegister fs);
576 void SqrtD(FpuRegister fd, FpuRegister fs);
[all …]
/art/profman/
Dprofman.cc65 static bool FdIsValid(int fd) { in FdIsValid() argument
66 return fd != kInvalidFd; in FdIsValid()
357 std::unique_ptr<const ProfileCompilationInfo> LoadProfile(const std::string& filename, int fd) { in LoadProfile() argument
359 fd = open(filename.c_str(), O_RDWR); in LoadProfile()
360 if (fd < 0) { in LoadProfile()
366 if (!info->Load(fd)) { in LoadProfile()
367 LOG(ERROR) << "Cannot load profile info from fd=" << fd << "\n"; in LoadProfile()
375 int fd, in DumpOneProfile() argument
378 std::unique_ptr<const ProfileCompilationInfo> info(LoadProfile(filename, fd)); in DumpOneProfile()
380 LOG(ERROR) << "Cannot load profile info from filename=" << filename << " fd=" << fd; in DumpOneProfile()
[all …]
/art/runtime/jit/
Dprofile_compilation_info.cc193 int fd = profile_file->Fd(); in Load() local
195 ProfileLoadSatus status = LoadInternal(fd, &error); in Load()
230 int fd = profile_file->Fd(); in Save() local
240 bool result = Save(fd); in Save()
258 static bool WriteBuffer(int fd, const uint8_t* buffer, size_t byte_count) { in WriteBuffer() argument
260 int bytes_written = TEMP_FAILURE_RETRY(write(fd, buffer, byte_count)); in WriteBuffer()
310 bool ProfileCompilationInfo::Save(int fd) { in Save() argument
313 DCHECK_GE(fd, 0); in Save()
317 if (!WriteBuffer(fd, kProfileMagic, sizeof(kProfileMagic))) { in Save()
320 if (!WriteBuffer(fd, kProfileVersion, sizeof(kProfileVersion))) { in Save()
[all …]
Dprofile_compilation_info.h295 bool Load(int fd);
309 bool Save(int fd);
367 static bool GenerateTestProfile(int fd,
375 static bool GenerateTestProfile(int fd,
564 ProfileLoadSatus FillFromFd(int fd,
599 ProfileLoadSatus LoadInternal(int fd, std::string* error);
603 ProfileLoadSatus ReadProfileHeader(int fd,
/art/compiler/utils/
Dswap_space_test.cc36 int fd = scratch.GetFd(); in SwapTest() local
39 SwapSpace pool(fd, 1 * MB); in SwapTest()
/art/runtime/hprof/
Dhprof.h24 void DumpHeap(const char* filename, int fd, bool direct_to_ddms);
/art/runtime/native/
Ddalvik_system_VMDebug.cc106 int fd = dup(originalFd); in VMDebug_startMethodTracingFd() local
107 if (fd < 0) { in VMDebug_startMethodTracingFd()
121 Trace::Start(traceFilename.c_str(), fd, bufferSize, flags, outputMode, in VMDebug_startMethodTracingFd()
246 int fd = -1; in VMDebug_dumpHprofData() local
248 fd = jniGetFDFromFileDescriptor(env, javaFd); in VMDebug_dumpHprofData()
249 if (fd < 0) { in VMDebug_dumpHprofData()
256 hprof::DumpHeap(filename.c_str(), fd, false); in VMDebug_dumpHprofData()

12