Searched refs:fd (Results 1 - 25 of 31) sorted by path

12

/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/dx/tests/083-ssa-phi-placement/
H A DBlort.java48 Object fd; field in class:Blort
51 if (fd == null) {
/dalvik/libdex/
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 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 DOptInvocation.h28 int dexOptCreateEmptyHeader(int fd);
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 DSysUtil.h57 * Map a file (from fd's current offset) into a shared, read-only memory
63 int sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap);
70 int sysMapFileSegmentInShmem(int fd, off_t start, size_t length,
101 int sysWriteFully(int fd, const void* buf, size_t count, const char* logMsg);
104 * Copy the given number of bytes from one fd to another. Returns
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...]
H A DZipArchive.h100 int dexZipPrepArchive(int fd, const char* debugFileName, ZipArchive* pArchive);
172 const ZipEntry entry, int fd);
/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 DDvmDex.h79 int dvmDexFileOpenFromFd(int fd, DvmDex** ppDvmDex);
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 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 DMisc.h273 bool dvmSetCloseOnExec(int fd);
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,
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 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 DSync.cpp273 int fd;
288 fd = open("/proc/self/cmdline", O_RDONLY);
290 read(fd, procName, sizeof(procName) - 1);
291 close(fd);
H A DThread.cpp3425 int fd = open(path, O_RDONLY);
3428 if (fd >= 0) {
3429 n = read(fd, name, sizeof(name) - 1);
3430 close(fd);
/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");
/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...]
H A DDexPrepare.h102 bool dvmUnlockCachedDexFile(int fd);
108 bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
117 bool dvmOptimizeDexFile(int fd, off_t dexOffset, long dexLen,
123 bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
/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);

Completed in 242 milliseconds

12