Home
last modified time | relevance | path

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

12

/art/runtime/jdwp/
Djdwp_bits.h70 static inline void Set1(uint8_t* buf, uint8_t val) { in Set1() argument
71 *buf = val; in Set1()
75 static inline void Set2BE(uint8_t* buf, uint16_t val) { in Set2BE() argument
76 *buf++ = (uint8_t)(val >> 8); in Set2BE()
77 *buf = (uint8_t)(val); in Set2BE()
81 static inline void Set4BE(uint8_t* buf, uint32_t val) { in Set4BE() argument
82 *buf++ = (uint8_t)(val >> 24); in Set4BE()
83 *buf++ = (uint8_t)(val >> 16); in Set4BE()
84 *buf++ = (uint8_t)(val >> 8); in Set4BE()
85 *buf = (uint8_t)(val); in Set4BE()
[all …]
Djdwp_expand_buf.cc153 static void SetUtf8String(uint8_t* buf, const char* str, size_t strLen) { in SetUtf8String() argument
154 Set4BE(buf, strLen); in SetUtf8String()
155 memcpy(buf + sizeof(uint32_t), str, strLen); in SetUtf8String()
179 void expandBufAddLocation(ExpandBuf* buf, const JdwpLocation& location) { in expandBufAddLocation() argument
180 expandBufAdd1(buf, location.type_tag); in expandBufAddLocation()
181 expandBufAddObjectId(buf, location.class_id); in expandBufAddLocation()
182 expandBufAddMethodId(buf, location.method_id); in expandBufAddLocation()
183 expandBufAdd8BE(buf, location.dex_pc); in expandBufAddLocation()
Djdwp.h65 static inline void SetFieldId(uint8_t* buf, FieldId val) { return Set8BE(buf, val); } in SetFieldId() argument
66 static inline void SetMethodId(uint8_t* buf, MethodId val) { return Set8BE(buf, val); } in SetMethodId() argument
67 static inline void SetObjectId(uint8_t* buf, ObjectId val) { return Set8BE(buf, val); } in SetObjectId() argument
68 static inline void SetRefTypeId(uint8_t* buf, RefTypeId val) { return Set8BE(buf, val); } in SetRefTypeId() argument
69 static inline void SetFrameId(uint8_t* buf, FrameId val) { return Set8BE(buf, val); } in SetFrameId() argument
/art/runtime/base/unix_file/
Drandom_access_file_test.h56 char buf[256]; in ReadString() local
59 while ((n = f->Read(buf, sizeof(buf), offset)) > 0) { in ReadString()
60 s->append(buf, n); in ReadString()
67 char buf[256]; in TestRead() local
72 ASSERT_EQ(0, file->Read(buf, 0, 0)); in TestRead()
73 ASSERT_EQ(0, file->Read(buf, 123, 0)); in TestRead()
85 std::unique_ptr<char> buf(new char[buf_size]); in TestReadContent()
87 ASSERT_EQ(-EINVAL, file->Read(buf.get(), 0, -123)); in TestReadContent()
90 ASSERT_EQ(content.size(), static_cast<uint64_t>(file->Read(buf.get(), buf_size, 0))); in TestReadContent()
91 ASSERT_EQ(std::string(buf.get(), content.size()), content); in TestReadContent()
[all …]
Drandom_access_file_utils.cc26 std::vector<char> buf(4096); in CopyFile() local
29 while ((n = src.Read(&buf[0], buf.size(), offset)) > 0) { in CopyFile()
30 if (dst->Write(&buf[0], n, offset) != n) { in CopyFile()
Dfd_file.cc138 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const { in Read() argument
140 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset)); in Read()
142 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset)); in Read()
163 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { in Write() argument
165 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset)); in Write()
167 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset)); in Write()
181 static ssize_t ReadIgnoreOffset(int fd, void *buf, size_t count, off_t offset) { in ReadIgnoreOffset() argument
183 return read(fd, buf, count); in ReadIgnoreOffset()
Drandom_access_file.h45 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const = 0;
60 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset) = 0;
Dfd_file.h54 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const WARN_UNUSED;
57 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset) WARN_UNUSED;
/art/sigchainlib/
Dsigchain_dummy.cc37 char buf[256]; in log() local
40 vsnprintf(buf, sizeof(buf), format, ap); in log()
42 __android_log_write(ANDROID_LOG_ERROR, "libsigchain", buf); in log()
44 std::cout << buf << "\n"; in log()
Dsigchain.cc102 char buf[256]; in log() local
105 vsnprintf(buf, sizeof(buf), format, ap); in log()
107 __android_log_write(ANDROID_LOG_ERROR, "libsigchain", buf); in log()
109 std::cout << buf << "\n"; in log()
/art/runtime/base/
Dstringprintf.cc51 char* buf = new char[length]; in StringAppendV() local
55 result = vsnprintf(buf, length, format, backup_ap); in StringAppendV()
60 dst->append(buf, result); in StringAppendV()
62 delete[] buf; in StringAppendV()
Dlogging.cc271 char* buf = nullptr; in LogLineLowStack() local
278 buf = reinterpret_cast<char*>(malloc(buf_size)); in LogLineLowStack()
280 if (buf != nullptr) { in LogLineLowStack()
281 snprintf(buf, buf_size, "%s:%u] %s", file, line, message); in LogLineLowStack()
282 android_writeLog(priority, tag, buf); in LogLineLowStack()
283 free(buf); in LogLineLowStack()
/art/runtime/
Dmonitor_android.cc30 static void Set4LE(uint8_t* buf, uint32_t val) { in Set4LE() argument
31 *buf++ = (uint8_t)(val); in Set4LE()
32 *buf++ = (uint8_t)(val >> 8); in Set4LE()
33 *buf++ = (uint8_t)(val >> 16); in Set4LE()
34 *buf = (uint8_t)(val >> 24); in Set4LE()
Dzip_archive_test.cc55 uint8_t buf[kBufSize]; in TEST_F() local
57 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buf, kBufSize)); in TEST_F()
61 computed_crc = crc32(computed_crc, buf, bytes_read); in TEST_F()
Dutils.h290 void Push32(std::vector<uint8_t, Alloc>* buf, int32_t data) { in Push32() argument
291 buf->push_back(data & 0xff); in Push32()
292 buf->push_back((data >> 8) & 0xff); in Push32()
293 buf->push_back((data >> 16) & 0xff); in Push32()
294 buf->push_back((data >> 24) & 0xff); in Push32()
297 void EncodeUnsignedLeb128(uint32_t data, std::vector<uint8_t>* buf);
298 void EncodeSignedLeb128(int32_t data, std::vector<uint8_t>* buf);
Dtrace.cc196 static void Append2LE(uint8_t* buf, uint16_t val) { in Append2LE() argument
197 *buf++ = static_cast<uint8_t>(val); in Append2LE()
198 *buf++ = static_cast<uint8_t>(val >> 8); in Append2LE()
202 static void Append4LE(uint8_t* buf, uint32_t val) { in Append4LE() argument
203 *buf++ = static_cast<uint8_t>(val); in Append4LE()
204 *buf++ = static_cast<uint8_t>(val >> 8); in Append4LE()
205 *buf++ = static_cast<uint8_t>(val >> 16); in Append4LE()
206 *buf++ = static_cast<uint8_t>(val >> 24); in Append4LE()
210 static void Append8LE(uint8_t* buf, uint64_t val) { in Append8LE() argument
211 *buf++ = static_cast<uint8_t>(val); in Append8LE()
[all …]
Dutils.cc140 std::vector<char> buf(8 * KB); in ReadFileToString() local
142 int64_t n = TEMP_FAILURE_RETRY(read(file.Fd(), &buf[0], buf.size())); in ReadFileToString()
149 result->append(&buf[0], n); in ReadFileToString()
160 char buf[kBufSize + 1]; // +1 for terminator. in PrintFileToLog() local
164 int64_t n = TEMP_FAILURE_RETRY(read(file.Fd(), &buf[filled_to], kBufSize - filled_to)); in PrintFileToLog()
168 buf[filled_to] = 0; in PrintFileToLog()
169 LOG(level) << buf; in PrintFileToLog()
177 if (buf[i] == '\n') { in PrintFileToLog()
179 buf[i] = 0; in PrintFileToLog()
180 LOG(level) << buf; in PrintFileToLog()
[all …]
Dcheck_jni.cc1302 static void DebugFree(void* buf, size_t len) { in DebugFree() argument
1303 if (munmap(buf, len) != 0) { in DebugFree()
1304 PLOG(FATAL) << "munmap(" << buf << ", " << len << ") failed"; in DebugFree()
1338 uint8_t buf[4]; in CheckHeader() local
1339 memcpy(buf, &magic_, 4); in CheckHeader()
1342 buf[3], buf[2], buf[1], buf[0], this); // Assumes little-endian. in CheckHeader()
1391 const uint8_t* buf = reinterpret_cast<const uint8_t*>(this); in StartRedZone() local
1392 return reinterpret_cast<const char*>(buf + sizeof(GuardedCopy)); in StartRedZone()
1403 const uint8_t* buf = reinterpret_cast<const uint8_t*>(this); in EndRedZone() local
1405 return reinterpret_cast<const char*>(buf + (buf_len - (kRedZoneSize / 2))); in EndRedZone()
[all …]
/art/compiler/dex/quick/arm/
Dtarget_arm.cc298 static char* DecodeRegList(int opcode, int vector, char* buf, size_t buf_size) { in DecodeRegList() argument
301 buf[0] = 0; in DecodeRegList()
311 snprintf(buf + strlen(buf), buf_size - strlen(buf), ", r%d", reg_id); in DecodeRegList()
314 snprintf(buf, buf_size, "r%d", reg_id); in DecodeRegList()
318 return buf; in DecodeRegList()
321 static char* DecodeFPCSRegList(int count, int base, char* buf, size_t buf_size) { in DecodeFPCSRegList() argument
322 snprintf(buf, buf_size, "s%d", base); in DecodeFPCSRegList()
324 snprintf(buf + strlen(buf), buf_size - strlen(buf), ", s%d", base + i); in DecodeFPCSRegList()
326 return buf; in DecodeFPCSRegList()
355 std::string buf; in BuildInsnString() local
[all …]
/art/compiler/dex/quick/arm64/
Dtarget_arm64.cc237 static void DecodeRegExtendOrShift(int operand, char *buf, size_t buf_size) { in DecodeRegExtendOrShift() argument
241 snprintf(buf, buf_size, ", %s #%d", shift_name, amount); in DecodeRegExtendOrShift()
246 snprintf(buf, buf_size, ", %s", extend_name); in DecodeRegExtendOrShift()
248 snprintf(buf, buf_size, ", %s #%d", extend_name, amount); in DecodeRegExtendOrShift()
341 std::string buf; in BuildInsnString() local
519 buf += tbuf; in BuildInsnString()
522 buf += *fmt++; in BuildInsnString()
528 std::string::npos != buf.find(", [")) { in BuildInsnString()
540 buf += " ; "; in BuildInsnString()
541 buf += tmp_stream.str(); in BuildInsnString()
[all …]
/art/compiler/
Doutput_stream_test.cc43 uint8_t buf[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; in GenerateTestOutput() local
44 EXPECT_TRUE(output_stream_->WriteFully(buf, 2)); in GenerateTestOutput()
48 EXPECT_TRUE(output_stream_->WriteFully(buf, 4)); in GenerateTestOutput()
50 EXPECT_TRUE(output_stream_->WriteFully(buf, 6)); in GenerateTestOutput()
/art/compiler/dex/quick/mips/
Dtarget_mips.cc369 std::string buf; in BuildInsnString() local
455 buf += tbuf; in BuildInsnString()
458 buf += *fmt++; in BuildInsnString()
461 return buf; in BuildInsnString()
466 char buf[256]; in DumpResourceMask() local
467 buf[0] = 0; in DumpResourceMask()
470 strcpy(buf, "all"); in DumpResourceMask()
478 strcat(buf, num); in DumpResourceMask()
483 strcat(buf, "cc "); in DumpResourceMask()
486 strcat(buf, "fpcc "); in DumpResourceMask()
[all …]
/art/tools/
Dstream-trace-converter.py64 buf = input.read(length)
65 if len(buf) != length:
67 output.write(buf)
/art/runtime/interpreter/
Dunstarted_runtime_test.cc181 uint16_t buf[kBaseLen]; in TEST_F() local
198 memcpy(buf, h_char_array->GetData(), kBaseLen * sizeof(uint16_t)); in TEST_F()
208 success = success && (data[i] == buf[i]); in TEST_F()
212 success = success && (data[i] == buf[i - trg_offset + start_index]); in TEST_F()
216 success = success && (data[i] == buf[i]); in TEST_F()
/art/tools/dexfuzz/src/dexfuzz/listeners/
DUniqueProgramTrackerListener.java84 byte[] buf = new byte[256]; in getMD5SumOfProgram()
89 int bytesRead = stream.read(buf); in getMD5SumOfProgram()
93 digest.update(buf); in getMD5SumOfProgram()

12