Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 44) sorted by relevance

12

/dalvik/vm/
DBits.h234 INLINE int readUtf8String(unsigned char const** ppSrc, char* buf, size_t bufLen) in readUtf8String() argument
239 memcpy(buf, *ppSrc, copyLen); in readUtf8String()
240 buf[copyLen] = '\0'; in readUtf8String()
255 char* buf; in readNewUtf8String() local
257 buf = (char*) malloc(length+1); in readNewUtf8String()
259 memcpy(buf, *ppSrc, length); in readNewUtf8String()
260 buf[length] = '\0'; in readNewUtf8String()
265 return buf; in readNewUtf8String()
272 INLINE void set1(u1* buf, u1 val) in set1() argument
274 *buf = (u1)(val); in set1()
[all …]
DDdm.cpp39 bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf, in dvmDdmHandlePacket() argument
68 memcpy(dataArray->contents, buf, dataLen); in dvmDdmHandlePacket()
262 u1 buf[256]; in dvmDdmSendThreadNotification() local
280 if (stringLen > (sizeof(buf) - sizeof(u4)*2) / 2) { in dvmDdmSendThreadNotification()
281 stringLen = (sizeof(buf) - sizeof(u4)*2) / 2; in dvmDdmSendThreadNotification()
285 set4BE(&buf[0x00], thread->threadId); in dvmDdmSendThreadNotification()
286 set4BE(&buf[0x04], stringLen); in dvmDdmSendThreadNotification()
289 outChars = (u2*)(void*)&buf[0x08]; in dvmDdmSendThreadNotification()
298 set4BE(&buf[0x00], thread->threadId); in dvmDdmSendThreadNotification()
301 dvmDbgDdmSendChunk(type, len, buf); in dvmDdmSendThreadNotification()
[all …]
DProfile.cpp149 static inline void storeShortLE(u1* buf, u2 val) in storeShortLE() argument
151 *buf++ = (u1) val; in storeShortLE()
152 *buf++ = (u1) (val >> 8); in storeShortLE()
154 static inline void storeIntLE(u1* buf, u4 val) in storeIntLE() argument
156 *buf++ = (u1) val; in storeIntLE()
157 *buf++ = (u1) (val >> 8); in storeIntLE()
158 *buf++ = (u1) (val >> 16); in storeIntLE()
159 *buf++ = (u1) (val >> 24); in storeIntLE()
161 static inline void storeLongLE(u1* buf, u8 val) in storeLongLE() argument
163 *buf++ = (u1) val; in storeLongLE()
[all …]
DStdioConverter.cpp36 char buf[kMaxLine+1]; member
214 actual = read(fd, data->buf + data->count, want); in readAndLog()
228 char* cp = data->buf; in readAndLog()
229 const char* start = data->buf; in readAndLog()
243 if (start == data->buf && data->count == kMaxLine) { in readAndLog()
244 data->buf[kMaxLine] = '\0'; in readAndLog()
254 if (start != data->buf) { in readAndLog()
255 if (start >= data->buf + data->count) { in readAndLog()
260 int remaining = data->count - (start - data->buf); in readAndLog()
261 memmove(data->buf, start, remaining); in readAndLog()
DJarFile.cpp48 char *buf, *c; in openAlternateSuffix() local
54 buf = (char*)malloc(bufLen); in openAlternateSuffix()
55 if (buf == NULL) { in openAlternateSuffix()
63 memcpy(buf, fileName, fileNameLen + 1); in openAlternateSuffix()
64 c = strrchr(buf, '.'); in openAlternateSuffix()
71 fd = open(buf, flags); in openAlternateSuffix()
73 *pCachedName = buf; in openAlternateSuffix()
76 ALOGV("Couldn't open %s: %s", buf, strerror(errno)); in openAlternateSuffix()
78 free(buf); in openAlternateSuffix()
DRawDexFile.cpp48 struct stat buf; in getModTimeAndSize() local
49 int result = fstat(fd, &buf); in getModTimeAndSize()
56 *modTime = (u4) buf.st_mtime; in getModTimeAndSize()
57 *size = (size_t) buf.st_size; in getModTimeAndSize()
58 assert((size_t) buf.st_size == buf.st_size); in getModTimeAndSize()
DDdm.h28 bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf,
/dalvik/tools/hprof-conv/
DHprofConv.c275 static uint16_t get2BE(const unsigned char* buf) in get2BE() argument
279 val = (buf[0] << 8) | buf[1]; in get2BE()
286 static uint32_t get4BE(const unsigned char* buf) in get4BE() argument
290 val = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; in get4BE()
297 static void set4BE(unsigned char* buf, uint32_t val) in set4BE() argument
299 buf[0] = val >> 24; in set4BE()
300 buf[1] = val >> 16; in set4BE()
301 buf[2] = val >> 8; in set4BE()
302 buf[3] = val; in set4BE()
324 const unsigned char* buf = origBuf; in computeClassDumpLen() local
[all …]
/dalvik/vm/jdwp/
DJdwpHandler.cpp103 const u1* buf, int dataLen, ExpandBuf* pReply, in finishInvoke() argument
109 u4 numArgs = read4BE(&buf); in finishInvoke()
123 u1 typeTag = read1(&buf); in finishInvoke()
125 u8 value = jdwpReadValue(&buf, width); in finishInvoke()
131 u4 options = read4BE(&buf); /* enum InvokeOptions bit flags */ in finishInvoke()
184 static JdwpError handleVM_Version(JdwpState* state, const u1* buf, in handleVM_Version() argument
210 const u1* buf, int dataLen, ExpandBuf* pReply) in handleVM_ClassesBySignature() argument
213 char* classDescriptor = readNewUtf8String(&buf, &strLen); in handleVM_ClassesBySignature()
259 const u1* buf, int dataLen, ExpandBuf* pReply) in handleVM_AllThreads() argument
281 const u1* buf, int dataLen, ExpandBuf* pReply) in handleVM_TopLevelThreadGroups() argument
[all …]
DJdwp.h55 INLINE void dvmSetFieldId(u1* buf, FieldId val) { return set4BE(buf, val); } in dvmSetFieldId() argument
56 INLINE void dvmSetMethodId(u1* buf, MethodId val) { return set4BE(buf, val); } in dvmSetMethodId() argument
57 INLINE void dvmSetObjectId(u1* buf, ObjectId val) { return set8BE(buf, val); } in dvmSetObjectId() argument
58 INLINE void dvmSetRefTypeId(u1* buf, RefTypeId val) { return set8BE(buf, val); } in dvmSetRefTypeId() argument
59 INLINE void dvmSetFrameId(u1* buf, FrameId val) { return set8BE(buf, val); } in dvmSetFrameId() argument
DJdwpSocket.cpp548 const unsigned char* buf = packetBuf;
557 length = read4BE(&buf);
558 id = read4BE(&buf);
559 flags = read1(&buf);
562 error = read2BE(&buf);
565 cmdSet = read1(&buf);
566 cmd = read1(&buf);
569 dataLen = length - (buf - packetBuf);
575 dvmPrintHexDumpDbg(buf, dataLen, LOG_TAG);
585 const unsigned char* buf = netState->inputBuffer; in handlePacket() local
[all …]
DJdwpAdb.cpp429 const unsigned char* buf = netState->inputBuffer; in handlePacket() local
439 length = read4BE(&buf); in handlePacket()
440 id = read4BE(&buf); in handlePacket()
441 flags = read1(&buf); in handlePacket()
444 error = read2BE(&buf); in handlePacket()
447 cmdSet = read1(&buf); in handlePacket()
448 cmd = read1(&buf); in handlePacket()
452 dataLen = length - (buf - netState->inputBuffer); in handlePacket()
461 dvmJdwpProcessRequest(state, &hdr, buf, dataLen, pReply); in handlePacket()
DJdwpHandler.h42 const u1* buf, int dataLen, ExpandBuf* pReply);
/dalvik/vm/compiler/codegen/arm/
DArchUtility.cpp28 static char * decodeRegList(ArmOpcode opcode, int vector, char *buf) in decodeRegList() argument
32 buf[0] = 0; in decodeRegList()
42 sprintf(buf + strlen(buf), ", r%d", regId); in decodeRegList()
45 sprintf(buf, "r%d", regId); in decodeRegList()
49 return buf; in decodeRegList()
76 static void buildInsnString(const char *fmt, ArmLIR *lir, char* buf, in buildInsnString() argument
80 char *bufEnd = &buf[size-1]; in buildInsnString()
225 if (buf+strlen(tbuf) <= bufEnd) { in buildInsnString()
226 strcpy(buf, tbuf); in buildInsnString()
227 buf += strlen(tbuf); in buildInsnString()
[all …]
/dalvik/vm/alloc/
DDdmHeap.cpp60 u1 *buf, *b; in dvmDdmSendHeapInfo() local
62 buf = (u1 *)malloc(HPIF_SIZE(1)); in dvmDdmSendHeapInfo()
63 if (buf == NULL) { in dvmDdmSendHeapInfo()
66 b = buf; in dvmDdmSendHeapInfo()
120 assert((intptr_t)b == (intptr_t)buf + (intptr_t)HPIF_SIZE(1)); in dvmDdmSendHeapInfo()
122 dvmDbgDdmSendChunk(CHUNK_TYPE("HPIF"), b - buf, buf); in dvmDdmSendHeapInfo()
176 u1 *buf; member
192 assert(ctx->buf <= ctx->pieceLenField && in flush_hpsg_chunk()
198 dvmDbgDdmSendChunk(ctx->type, ctx->p - ctx->buf, ctx->buf); in flush_hpsg_chunk()
202 ctx->p = ctx->buf; in flush_hpsg_chunk()
[all …]
/dalvik/vm/compiler/codegen/x86/
DCodegenDriver.cpp253 char buf[1024]; in dvmCompilerArchDump() local
256 buf[0] = 0; in dvmCompilerArchDump()
268 sprintf(buf+strlen(buf), "%x,", start); in dvmCompilerArchDump()
270 sprintf(buf+strlen(buf), "%x-%x,", start, start + streak - 1); in dvmCompilerArchDump()
284 sprintf(buf+strlen(buf), "%x", start); in dvmCompilerArchDump()
286 sprintf(buf+strlen(buf), "%x-%x", start, start + streak - 1); in dvmCompilerArchDump()
289 if (strlen(buf)) { in dvmCompilerArchDump()
290 ALOGD("dalvik.vm.jit.op = %s", buf); in dvmCompilerArchDump()
/dalvik/vm/hprof/
DHprofOutput.cpp24 #define U2_TO_BUF_BE(buf, offset, value) \ argument
26 unsigned char *buf_ = (unsigned char *)(buf); \
33 #define U4_TO_BUF_BE(buf, offset, value) \ argument
35 unsigned char *buf_ = (unsigned char *)(buf); \
44 #define U8_TO_BUF_BE(buf, offset, value) \ argument
46 unsigned char *buf_ = (unsigned char *)(buf); \
93 unsigned char buf[4]; in hprofContextInit() local
106 U4_TO_BUF_BE(buf, 0, sizeof(void *)); in hprofContextInit()
107 fwrite(buf, 1, sizeof(u4), fp); in hprofContextInit()
119 U4_TO_BUF_BE(buf, 0, (u4)(nowMs >> 32)); in hprofContextInit()
[all …]
/dalvik/tools/dmtracedump/
DTraceDump.c1407 char buf[80]; in printInclusiveMethod() local
1428 sprintf(buf, "[%d]", relative->index); in printInclusiveMethod()
1430 int len = strlen(buf); in printInclusiveMethod()
1433 sprintf(buf, "<a href=\"#m%d\">[%d]", in printInclusiveMethod()
1448 space_ptr, buf, anchor_close, in printInclusiveMethod()
1455 space_ptr, buf, anchor_close, in printInclusiveMethod()
1465 space_ptr, buf, anchor_close, in printInclusiveMethod()
1472 space_ptr, buf, anchor_close, in printInclusiveMethod()
1729 char buf[40]; in printInclusiveProfile() local
1759 sprintf(buf, "[%d]", ii); in printInclusiveProfile()
[all …]
DCreateTestTrace.c77 char buf[BUF_SIZE]; variable
139 while (fgets(buf, BUF_SIZE, inputFp)) { in parseInputFile()
140 char *cp = buf; in parseInputFile()
171 while (fgets(buf, BUF_SIZE, inputFp)) { in parseInputFile()
177 char *cp = buf; in parseInputFile()
254 printf("Indent: %d; IndentLevel: %d; Line: %s", indent, indentLevel, buf); in parseInputFile()
271 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile()
282 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile()
290 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile()
/dalvik/libdex/
DSysUtil.cpp391 int sysWriteFully(int fd, const void* buf, size_t count, const char* logMsg) in sysWriteFully() argument
394 ssize_t actual = TEMP_FAILURE_RETRY(write(fd, buf, count)); in sysWriteFully()
402 buf = (const void*) (((const u1*) buf) + actual); in sysWriteFully()
414 unsigned char buf[kBufSize]; in sysCopyFileToFile() local
419 ssize_t actual = TEMP_FAILURE_RETRY(read(inFd, buf, getSize)); in sysCopyFileToFile()
426 if (sysWriteFully(outFd, buf, getSize, "sysCopyFileToFile") != 0) in sysCopyFileToFile()
/dalvik/tools/dexdeps/src/com/android/dexdeps/
DOutput.java298 char[] buf = new char[targetLen + arrayDepth * 2]; in descriptorToDot() local
304 buf[i] = (ch == '/') ? '.' : ch; in descriptorToDot()
309 buf[i++] = '['; in descriptorToDot()
310 buf[i++] = ']'; in descriptorToDot()
312 assert i == buf.length; in descriptorToDot()
314 return new String(buf); in descriptorToDot()
/dalvik/dx/src/com/android/dx/util/
DTwoColumnOutput.java232 private static void appendNewlineIfNecessary(StringBuffer buf, in appendNewlineIfNecessary() argument
235 int len = buf.length(); in appendNewlineIfNecessary()
237 if ((len != 0) && (buf.charAt(len - 1) != '\n')) { in appendNewlineIfNecessary()
/dalvik/dexgen/src/com/android/dexgen/util/
DTwoColumnOutput.java232 private static void appendNewlineIfNecessary(StringBuffer buf, in appendNewlineIfNecessary() argument
235 int len = buf.length(); in appendNewlineIfNecessary()
237 if ((len != 0) && (buf.charAt(len - 1) != '\n')) { in appendNewlineIfNecessary()
/dalvik/vm/native/
Ddalvik_system_VMRuntime.cpp182 char buf[64]; in Dalvik_dalvik_system_VMRuntime_vmVersion() local
183 sprintf(buf, "%d.%d.%d", in Dalvik_dalvik_system_VMRuntime_vmVersion()
185 returnCString(pResult, buf); in Dalvik_dalvik_system_VMRuntime_vmVersion()
/dalvik/dx/src/com/android/dx/cf/direct/
DClassPathOpener.java208 byte[] buf = new byte[20000]; in processArchive()
234 int amt = in.read(buf); in processArchive()
239 baos.write(buf, 0, amt); in processArchive()

12