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

/dalvik/dx/tests/083-ssa-phi-placement/
H A DBlort.java48 Object fd; field in class:Blort
51 if (fd == null) {
/dalvik/libdex/
H A DOptInvocation.cpp114 * "fd" must be positioned at the start of the file. On return, it will
120 int dexOptCreateEmptyHeader(int fd) argument
125 assert(lseek(fd, 0, SEEK_CUR) == 0);
135 actual = write(fd, &optHdr, sizeof(optHdr));
H A DCmdUtils.cpp46 int fd = -1; local
57 fd = open(outFileName, O_WRONLY | O_CREAT | O_EXCL, 0600);
58 if (fd < 0) {
77 if (dexZipExtractEntryToFile(&archive, entry, fd) != 0) {
85 if (fd >= 0)
86 close(fd);
118 int fd = -1; local
177 fd = open(fileName, O_RDONLY | O_BINARY);
178 if (fd < 0) {
186 if (sysMapFileInShmemWritableReadOnly(fd, pMa
[all...]
H A DSysUtil.cpp80 static int getFileStartAndLength(int fd, off_t *start_, size_t *length_) argument
88 start = lseek(fd, 0L, SEEK_CUR);
89 end = lseek(fd, 0L, SEEK_END);
90 (void) lseek(fd, start, SEEK_SET);
110 int sysFakeMapFile(int fd, MemMapping* pMap) argument
122 if (getFileStartAndLength(fd, &start, &length) < 0)
126 if (read(fd, memPtr, length) < 0) {
127 ALOGW("read(fd=%d, start=%d, length=%d) failed: %s", (int) length,
128 fd, (int) start, strerror(errno));
140 * Map a file (from fd'
150 sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap) argument
193 sysMapFileSegmentInShmem(int fd, off_t start, size_t length, MemMapping* pMap) argument
316 sysWriteFully(int fd, const void* buf, size_t count, const char* logMsg) argument
[all...]
H A DZipArchive.cpp155 static int mapCentralDirectory0(int fd, const char* debugFileName, argument
267 if (sysMapFileSegmentInShmem(fd, centralDirOffset, centralDirSize,
288 static int mapCentralDirectory(int fd, const char* debugFileName, argument
294 off64_t fileLength = lseek64(fd, 0, SEEK_END);
321 int result = mapCentralDirectory0(fd, debugFileName, pArchive,
424 int fd, err; local
430 fd = open(fileName, O_RDONLY | O_BINARY, 0);
431 if (fd < 0) {
437 return dexZipPrepArchive(fd, fileName, pArchive);
445 int dexZipPrepArchive(int fd, cons argument
777 dexZipExtractEntryToFile(const ZipArchive* pArchive, const ZipEntry entry, int fd) argument
[all...]
/dalvik/vm/hprof/
H A DHprof.cpp38 hprof_context_t* hprofStartup(const char *outputFileName, int fd, argument
51 hprofContextInit(ctx, strdup(outputFileName), fd, false, directToDdms);
76 hprofContextInit(headCtx, strdup(tailCtx->fileName), tailCtx->fd, true,
112 assert(headCtx->fd == tailCtx->fd);
115 if (headCtx->fd >= 0) {
116 outFd = dup(headCtx->fd);
118 ALOGE("dup(%d) failed: %s", headCtx->fd, strerror(errno));
164 /* we don't own ctx->fd, do not close */
229 * If "fd" i
[all...]
H A DHprofOutput.cpp67 void hprofContextInit(hprof_context_t *ctx, char *fileName, int fd, argument
85 ctx->fd = fd;
H A DHprof.h133 * If directToDdms is set, "fileName" and "fd" will be ignored.
134 * Otherwise, "fileName" must be valid, though if "fd" >= 0 it will
142 int fd; member in struct:hprof_context_t
188 void hprofContextInit(hprof_context_t *ctx, char *fileName, int fd,
221 hprof_context_t* hprofStartup(const char *outputFileName, int fd,
225 int hprofDumpHeap(const char* fileName, int fd, bool directToDdms);
/dalvik/vm/
H A DDvmDex.cpp93 int dvmDexFileOpenFromFd(int fd, DvmDex** ppDvmDex) argument
104 if (lseek(fd, 0, SEEK_SET) < 0) {
109 if (sysMapFileInShmemWritableReadOnly(fd, &memMap) != 0) {
H A DStdioConverter.cpp42 static bool readAndLog(int fd, BufferedData* data, const char* tag);
203 * Data is pending on "fd". Read as much as will fit in "data", then
206 static bool readAndLog(int fd, BufferedData* data, const char* tag) argument
214 actual = read(fd, data->buf + data->count, want);
217 tag, fd, want, (int)actual, strerror(errno));
H A DJarFile.cpp52 int fd = -1; local
71 fd = open(buf, flags);
72 if (fd >= 0) {
74 return fd;
92 int fd; local
113 fd = openAlternateSuffix(fileName, "odex", O_RDONLY, &cachedName);
114 if (fd >= 0) {
116 if (!dvmCheckOptHeaderAndDependencies(fd, false, 0, 0, true, true)) {
120 close(fd);
121 fd
205 int fd = -1; local
[all...]
H A DRawDexFile.cpp30 * Copy the given number of bytes from one fd to another, first
31 * seeking the source fd to the start of the file.
44 * Get the modification time and size in bytes for the given fd.
46 static int getModTimeAndSize(int fd, u4* modTime, size_t* size) argument
49 int result = fstat(fd, &buf);
65 * of the given fd, which is presumed to be a reference to a dex file
66 * with the cursor at the start of the file. The fd's cursor is
69 static int verifyMagicAndGetAdler32(int fd, u4 *adler32) argument
76 ssize_t amt = read(fd, headerStart, sizeof(headerStart));
131 /* If we fork/exec into dexopt, don't let it inherit the open fd
[all...]
H A DSignalCatcher.cpp77 int fd = -1; local
79 fd = open("/proc/self/cmdline", O_RDONLY, 0);
80 if (fd < 0)
86 actual = read(fd, tmpBuf, sizeof(tmpBuf)-1);
94 if (fd >= 0)
95 close(fd);
189 int fd = open(gDvm.stackTraceFile, O_WRONLY | O_APPEND | O_CREAT, 0666); local
190 if (fd < 0) {
194 ssize_t actual = TEMP_FAILURE_RETRY(write(fd, traceBuf, traceLen));
202 close(fd);
[all...]
H A DLinearAlloc.cpp133 int fd; local
135 fd = ashmem_create_region("dalvik-LinearAlloc", DEFAULT_MAX_LENGTH);
136 if (fd < 0) {
143 MAP_PRIVATE, fd, 0);
148 close(fd);
152 close(fd);
H A DMisc.cpp568 bool dvmSetCloseOnExec(int fd) argument
574 * value of the fd flags is probably unnecessary.
576 flags = fcntl(fd, F_GETFD);
578 ALOGW("Unable to get fd flags for fd %d", fd);
581 if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
582 ALOGW("Unable to set close-on-exec for fd %d", fd);
614 int fd, re local
670 int i, fd; local
[all...]
H A DProfile.cpp331 int fd = open("/dev/qemu_trace", O_RDWR); local
332 if (fd < 0) {
336 MAP_SHARED, fd, 0);
337 close(fd);
498 * This opens the output file (if an already open fd has not been supplied,
/dalvik/dexopt/
H A DOptMain.cpp271 * 2. zip fd (input, read-only)
272 * 3. cache fd (output, read-write, locked with flock)
303 GET_ARG(zipFd, strtol, "bad zip fd");
304 GET_ARG(cacheFd, strtol, "bad cache fd");
421 int fd, flags, vmBuildVersion; local
449 GET_ARG(fd, strtol, "bad fd");
458 ALOGV("Args: fd=%d off=%ld len=%ld name='%s' mod=%#x crc=%#x flg=%d (argc=%d)",
459 fd, offset, length, debugFileName, modWhen, crc, flags, argc);
521 if (!dvmContinueOptimization(fd, offse
[all...]
/dalvik/vm/compiler/
H A DCompiler.cpp171 int fd; local
174 fd = ashmem_create_region("dalvik-jit-code-cache", gDvmJit.codeCacheSize);
175 if (fd < 0) {
182 MAP_PRIVATE , fd, 0);
183 close(fd);
/dalvik/vm/jdwp/
H A DJdwpAdb.cpp128 * Receive a file descriptor from ADB. The fd can be used to communicate
514 int fd; local
519 fd = netState->controlSock;
520 if (fd >= 0) {
521 FD_SET(fd, &readfds);
522 if (maxfd < fd)
523 maxfd = fd;
525 fd = netState->clientSock;
526 if (fd >= 0) {
527 FD_SET(fd,
[all...]
H A DJdwpSocket.cpp275 * Returns "true" if the fd is ready, "false" if not.
293 if (FD_ISSET(sock, &readfds)) /* make sure it's our fd */
326 static int setNoDelay(int fd) argument
330 cc = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
672 int fd; local
688 fd = netState->listenSock;
689 if (fd >= 0)
690 FD_SET(fd, &readfds);
691 fd = netState->clientSock;
692 if (fd >
[all...]
/dalvik/vm/native/
H A Ddalvik_system_VMDebug.cpp30 * Extracts the fd from a FileDescriptor object.
40 int fd = dvmGetFieldInt(obj, gDvm.offJavaIoFileDescriptor_descriptor); local
41 if (fd < 0) {
46 return fd;
246 * static void startMethodTracingFd(String traceFileName, FileDescriptor fd,
263 int fd = dup(origFd); local
264 if (fd < 0) {
275 dvmMethodTraceStart(traceFileName, fd, bufferSize, flags, false, false, 0);
517 * static void dumpHprofData(String fileName, FileDescriptor fd)
534 dvmThrowNullPointerException("fileName == null && fd
549 int fd = -1; local
[all...]
/dalvik/vm/analysis/
H A DDexPrepare.cpp57 static int writeDependencies(int fd, u4 modWhen, u4 crc);
58 static bool writeOptData(int fd, const DexClassLookup* pClassLookup,\
60 static bool computeFileChecksum(int fd, off_t start, size_t length, u4* pSum);
107 * Return the fd of an open file in the DEX file cache area. If the cache
132 int fd, cc; local
143 fd = createIfMissing ? open(cacheFileName, O_CREAT|O_RDWR, 0644) : -1;
144 if (fd < 0) {
145 fd = open(cacheFileName, O_RDONLY, 0);
146 if (fd < 0) {
154 return fd;
320 dvmUnlockCachedDexFile(int fd) argument
351 dvmOptimizeDexFile(int fd, off_t dexOffset, long dexLength, const char* fileName, u4 modWhen, u4 crc, bool isBootstrap) argument
527 dvmContinueOptimization(int fd, off_t dexOffset, long dexLength, const char* fileName, u4 modWhen, u4 crc, bool isBootstrap) argument
1170 dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen, u4 crc, bool expectVerify, bool expectOpt) argument
1361 writeDependencies(int fd, u4 modWhen, u4 crc) argument
1435 writeChunk(int fd, u4 type, const void* data, size_t size) argument
1482 writeOptData(int fd, const DexClassLookup* pClassLookup, const RegisterMapBuilder* pRegMapBuilder) argument
1516 computeFileChecksum(int fd, off_t start, size_t length, u4* pSum) argument
[all...]
/dalvik/vm/alloc/
H A DHeapSource.cpp400 int fd = ashmem_create_region("dalvik-heap", rem_size); local
401 if (fd == -1) {
405 void* addr = mmap(newHeapBase, rem_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
406 int ret = close(fd);
412 ALOGE("Unable to close fd for the ashmem region for the new heap");

Completed in 928 milliseconds