Searched defs:fd (Results 1 - 22 of 22) 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.cpp144 static int mapCentralDirectory0(int fd, const char* debugFileName, argument
149 if (lseek(fd, searchStart, SEEK_SET) != searchStart) {
153 ssize_t actual = TEMP_FAILURE_RETRY(read(fd, scanBuf, readAmount));
207 if (sysMapFileSegmentInShmem(fd, dirOffset, dirSize,
228 static int mapCentralDirectory(int fd, const char* debugFileName, argument
234 off_t fileLength = lseek(fd, 0, SEEK_END);
261 int result = mapCentralDirectory0(fd, debugFileName, pArchive,
349 int fd, err; local
355 fd = open(fileName, O_RDONLY | O_BINARY, 0);
356 if (fd <
370 dexZipPrepArchive(int fd, const char* debugFileName, ZipArchive* pArchive) argument
696 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;
90 int fd; local
124 fd = dvmOpenCachedDexFile(fileName, cachedName,
128 ALOGV("dvmOpenCachedDexFile returned fd %d", fd);
129 if (fd < 0) {
137 if (!dvmUnlockCachedDexFile(fd)) {
201 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.cpp203 int fd = open("/dev/qemu_trace", O_RDWR); local
204 if (fd < 0) {
208 MAP_SHARED, fd, 0);
209 close(fd);
355 * 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.cpp29 * Extracts the fd from a FileDescriptor object.
39 int fd = dvmGetFieldInt(obj, gDvm.offJavaIoFileDescriptor_descriptor); local
40 if (fd < 0) {
45 return fd;
227 * FileDescriptor fd, int bufferSize, int flags)
231 * If both "traceFileName" and "fd" are null, the result will be sent
257 int fd = -1; local
263 fd = dup(origFd);
264 if (fd < 0) {
272 fd, bufferSiz
523 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...]

Completed in 4480 milliseconds