Searched defs:fd (Results 1 - 19 of 19) sorted by relevance

/art/runtime/base/unix_file/
H A Dmapped_file.h48 explicit MappedFile(int fd) : FdFile(fd), file_size_(-1), mapped_file_(NULL) { argument
H A Dmapped_file_test.cc36 int fd = TEMP_FAILURE_RETRY(open(good_path_.c_str(), O_CREAT|O_RDWR, 0666)); local
37 FdFile dst(fd);
H A Dfd_file.cc29 FdFile::FdFile(int fd) : fd_(fd), auto_close_(true) { argument
32 FdFile::FdFile(int fd, const std::string& path) : fd_(fd), file_path_(path), auto_close_(true) { argument
/art/runtime/
H A Dzip_archive_test.cc52 int fd = open(tmp.GetFilename().c_str(), O_RDONLY); local
53 ASSERT_NE(-1, fd);
57 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buf, kBufSize));
H A Dzip_archive.cc76 static void SetCloseOnExec(int fd) { argument
78 int flags = fcntl(fd, F_GETFD);
80 PLOG(WARNING) << "fcntl(" << fd << ", F_GETFD) failed";
83 int rc = fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
85 PLOG(WARNING) << "fcntl(" << fd << ", F_SETFD, " << flags << ") failed";
105 ZipArchive* ZipArchive::OpenFromFd(int fd, const char* filename, std::string* error_msg) { argument
107 DCHECK_GT(fd, 0);
110 const int32_t error = OpenArchiveFd(fd, filename, &handle);
H A Dmem_map.h70 static MemMap* MapFile(size_t byte_count, int prot, int flags, int fd, off_t start, argument
72 return MapFileAtAddress(NULL, byte_count, prot, flags, fd, start, false, filename, error_msg);
83 static MemMap* MapFileAtAddress(byte* addr, size_t byte_count, int prot, int flags, int fd,
H A Dsignal_catcher.cc106 int fd = open(stack_trace_file_.c_str(), O_APPEND | O_CREAT | O_WRONLY, 0666); local
107 if (fd == -1) {
111 std::unique_ptr<File> file(new File(fd, stack_trace_file_));
H A Dcommon_runtime_test.cc60 int fd = mkstemp(&filename_[0]); local
61 CHECK_NE(-1, fd);
62 file_.reset(new File(fd, GetFilename()));
68 int fd = open(filename_.c_str(), O_RDWR | O_CREAT, 0666); local
69 CHECK_NE(-1, fd);
70 file_.reset(new File(fd, GetFilename()));
H A Dmem_map.cc247 ScopedFd fd(-1);
265 fd.reset(ashmem_create_region(debug_friendly_name.c_str(), page_aligned_byte_count));
266 if (fd.get() == -1) {
331 actual = mmap(reinterpret_cast<void*>(ptr), page_aligned_byte_count, prot, flags, fd.get(),
354 actual = mmap(expected_ptr, page_aligned_byte_count, prot, flags, fd.get(), 0);
365 void* actual = mmap(expected_ptr, page_aligned_byte_count, prot, flags, fd.get(), 0);
374 expected_ptr, page_aligned_byte_count, prot, flags, fd.get(),
386 MemMap* MemMap::MapFileAtAddress(byte* expected_ptr, size_t byte_count, int prot, int flags, int fd, argument
427 fd,
437 page_aligned_expected, page_aligned_byte_count, prot, flags, fd,
[all...]
H A Dprofiler.cc275 int fd = open(full_name.c_str(), O_RDWR); local
276 if (fd < 0) {
284 int err = flock(fd, LOCK_EX);
291 profile_table_.ReadPrevious(fd, options_.GetProfileType());
294 lseek(fd, 0, SEEK_SET);
304 int n = ::write(fd, p, length);
310 ftruncate(fd, full_length);
313 err = flock(fd, LOCK_UN);
319 ::close(fd);
721 static bool ReadProfileLine(int fd, st argument
737 ReadPrevious(int fd, ProfileDataType type) argument
[all...]
H A Druntime.cc457 int fd = open(profile_output_filename_.c_str(), O_RDWR|O_CREAT|O_EXCL, 0660); local
458 if (fd >= 0) {
459 close(fd);
H A Ddex_file.cc55 ScopedFd fd(open(filename, O_RDONLY, 0));
56 if (fd.get() == -1) {
60 int n = TEMP_FAILURE_RETRY(read(fd.get(), magic, sizeof(*magic)));
65 if (lseek(fd.get(), 0, SEEK_SET) != 0) {
70 return fd.release();
89 ScopedFd fd(OpenAndReadMagic(file_part, &magic, error_msg));
90 if (fd.get() == -1) {
95 std::unique_ptr<ZipArchive> zip_archive(ZipArchive::OpenFromFd(fd.release(), filename, error_msg));
110 std::unique_ptr<const DexFile> dex_file(DexFile::OpenFile(fd.release(), filename, false, error_msg));
124 ScopedFd fd(OpenAndReadMagi
176 OpenFile(int fd, const char* location, bool verify, std::string* error_msg) argument
225 OpenZip(int fd, const std::string& location, std::string* error_msg, std::vector<const DexFile*>* dex_files) argument
[all...]
H A Dclass_linker.cc617 std::string oat_fd_option("--oat-fd=");
1029 int fd, const char* oat_location,
1034 if (!GenerateOatFile(dex_location, fd, oat_location, &error_msg)) {
1028 CreateOatFileForDexLocation(const char* dex_location, int fd, const char* oat_location, std::vector<std::string>* error_msgs) argument
/art/compiler/
H A Delf_writer_mclinker.cc333 // TODO: avoid dup of fd by fixing Linker::emit to not close the argument fd.
334 int fd = dup(elf_file_->Fd()); local
335 if (fd == -1) {
339 if (!linker_->emit(*module_.get(), fd)) {
/art/runtime/jdwp/
H A Djdwp_adb.cc130 * Receive a file descriptor from ADB. The fd can be used to communicate
309 int fd; local
314 fd = control_sock_;
315 if (fd >= 0) {
316 FD_SET(fd, &readfds);
317 if (maxfd < fd) {
318 maxfd = fd;
321 fd = clientSock;
322 if (fd >= 0) {
323 FD_SET(fd,
[all...]
H A Djdwp_socket.cc197 static int SetNoDelay(int fd) { argument
199 int cc = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
360 int fd; local
365 fd = listenSock;
366 if (fd >= 0) {
367 FD_SET(fd, &readfds);
368 if (maxfd < fd) {
369 maxfd = fd;
372 fd = clientSock;
373 if (fd >
[all...]
/art/runtime/native/
H A Ddalvik_system_VMDebug.cc91 int fd = dup(originalFd); local
92 if (fd < 0) {
104 Trace::Start(traceFilename.c_str(), fd, bufferSize, flags, false, samplingEnabled, intervalUs);
188 * static void dumpHprofData(String fileName, FileDescriptor fd)
197 ThrowNullPointerException(NULL, "fileName == null && fd == null");
209 filename = "[fd]";
212 int fd = -1; local
214 fd = jniGetFDFromFileDescriptor(env, javaFd);
215 if (fd < 0) {
222 hprof::DumpHeap(filename.c_str(), fd, fals
[all...]
/art/compiler/utils/mips/
H A Dassembler_mips.cc70 void MipsAssembler::EmitFR(int opcode, int fmt, FRegister ft, FRegister fs, FRegister fd, int funct) { argument
73 CHECK_NE(fd, kNoFRegister);
78 static_cast<int32_t>(fd) << kFdShift |
344 void MipsAssembler::AddS(FRegister fd, FRegister fs, FRegister ft) { argument
345 EmitFR(0x11, 0x10, ft, fs, fd, 0x0);
348 void MipsAssembler::SubS(FRegister fd, FRegister fs, FRegister ft) { argument
349 EmitFR(0x11, 0x10, ft, fs, fd, 0x1);
352 void MipsAssembler::MulS(FRegister fd, FRegister fs, FRegister ft) { argument
353 EmitFR(0x11, 0x10, ft, fs, fd, 0x2);
356 void MipsAssembler::DivS(FRegister fd, FRegiste argument
360 AddD(DRegister fd, DRegister fs, DRegister ft) argument
365 SubD(DRegister fd, DRegister fs, DRegister ft) argument
370 MulD(DRegister fd, DRegister fs, DRegister ft) argument
375 DivD(DRegister fd, DRegister fs, DRegister ft) argument
380 MovS(FRegister fd, FRegister fs) argument
384 MovD(DRegister fd, DRegister fs) argument
[all...]
/art/runtime/hprof/
H A Dhprof.cc385 Hprof(const char* output_filename, int fd, bool direct_to_ddms) argument
387 fd_(fd),
671 // If direct_to_ddms_ is set, "filename_" and "fd" will be ignored.
672 // Otherwise, "filename_" must be valid, though if "fd" >= 0 it will
1090 // If "fd" is >= 0, the output will be written to that file descriptor.
1092 void DumpHeap(const char* filename, int fd, bool direct_to_ddms) { argument
1096 Hprof hprof(filename, fd, direct_to_ddms);

Completed in 6792 milliseconds