Lines Matching refs:buf

289 static uint16_t get2BE(const unsigned char* buf)  in get2BE()  argument
293 val = (buf[0] << 8) | buf[1]; in get2BE()
300 static uint32_t get4BE(const unsigned char* buf) in get4BE() argument
304 val = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; in get4BE()
311 static void set4BE(unsigned char* buf, uint32_t val) in set4BE() argument
313 buf[0] = val >> 24; in set4BE()
314 buf[1] = val >> 16; in set4BE()
315 buf[2] = val >> 8; in set4BE()
316 buf[3] = val; in set4BE()
338 const unsigned char* buf = origBuf; in computeClassDumpLen() local
343 buf += blockLen; in computeClassDumpLen()
349 count = get2BE(buf); in computeClassDumpLen()
350 buf += 2; in computeClassDumpLen()
357 basicType = buf[2]; in computeClassDumpLen()
364 buf += 2 + 1 + basicLen; in computeClassDumpLen()
370 count = get2BE(buf); in computeClassDumpLen()
371 buf += 2; in computeClassDumpLen()
378 basicType = buf[kIdentSize]; in computeClassDumpLen()
385 buf += kIdentSize + 1 + basicLen; in computeClassDumpLen()
391 count = get2BE(buf); in computeClassDumpLen()
392 buf += 2; in computeClassDumpLen()
396 buf += kIdentSize + 1; in computeClassDumpLen()
402 DBUG("Total class dump len: %d\n", buf - origBuf); in computeClassDumpLen()
403 return buf - origBuf; in computeClassDumpLen()
444 unsigned char* buf = origBuf; in processHeapDump() local
453 if (ebAddData(pOutBuf, buf, kRecHdrLen) != 0) in processHeapDump()
456 buf += kRecHdrLen; /* skip past record header */ in processHeapDump()
460 unsigned char subType = buf[0]; in processHeapDump()
495 subLen = computeClassDumpLen(buf+1, len-1); in processHeapDump()
498 subLen = computeInstanceDumpLen(buf+1, len-1); in processHeapDump()
504 subLen = computeObjectArrayDumpLen(buf+1, len-1); in processHeapDump()
510 subLen = computePrimitiveArrayDumpLen(buf+1, len-1); in processHeapDump()
517 heapType = get4BE(buf+1); in processHeapDump()
529 buf[0] = HPROF_ROOT_UNKNOWN; in processHeapDump()
533 buf[0] = HPROF_ROOT_UNKNOWN; in processHeapDump()
537 buf[0] = HPROF_ROOT_UNKNOWN; in processHeapDump()
541 buf[0] = HPROF_ROOT_UNKNOWN; in processHeapDump()
545 buf[0] = HPROF_ROOT_UNKNOWN; in processHeapDump()
550 buf[0] = HPROF_ROOT_UNKNOWN; in processHeapDump()
552 ebAddData(pOutBuf, buf, 1 + kIdentSize); in processHeapDump()
556 buf[0] = HPROF_ROOT_UNKNOWN; in processHeapDump()
560 buf[0] = HPROF_PRIMITIVE_ARRAY_DUMP; in processHeapDump()
561 buf[5] = buf[6] = buf[7] = buf[8] = 0; /* set array len to 0 */ in processHeapDump()
568 subType, (size_t) (buf - origBuf)); in processHeapDump()
575 ebAddData(pOutBuf, buf, 1 + subLen); in processHeapDump()
582 buf += 1 + subLen; in processHeapDump()
664 unsigned char* buf = ebGetBuffer(pBuf); in filterData() local
669 type = buf[0]; in filterData()
670 timestamp = get4BE(buf + 1); in filterData()
671 length = get4BE(buf + 5); in filterData()
672 buf = NULL; /* ptr invalid after next read op */ in filterData()