/developtools/smartperf_host/ide/src/hdc/transmission/ |
D | DataProcessing.ts | 46 let dataSize = usbHead!.dataSize; 47 if (dataSize > 0) { 48 let body = await this.readBody(dataSize); 76 public async readBody(dataSize: number): Promise<DataView> { 77 let data = await this.transmissionChannel.readData(dataSize); 86 dataSize: number 100 dataSize 104 let finalBufSize = dataView.byteLength + pbs.byteLength + dataSize; 120 private buildPacketHeader(sessionId: number, option: number, dataSize: number): Uint8Array { 125 dataSize
|
/developtools/smartperf_host/ide/src/hdc/message/ |
D | PayloadHead.ts | 25 …: Array<number>, reserve: Array<number>, protocolVer: number, headSize: number, dataSize: number) { 31 this._dataSize = dataSize; 56 let dataSize; 58 dataSize = 0; 60 dataSize = data.getUint32(7); 62 …n new PayloadHead([flagZero, flagOne], [reserveZero, reserveOne], protocolVer, headSize, dataSize); 81 get dataSize(): number { method in PayloadHead 85 set dataSize(value: number) { method in PayloadHead
|
D | USBHead.ts | 24 constructor(flag: number[], option: number, sessionId: number, dataSize: number) { 29 this._dataSize = dataSize; 70 let dataSize = data.getUint32(7); 71 return new USBHead([flagZero, flagOne], option, sessionId, dataSize); 98 get dataSize(): number { method in USBHead 102 set dataSize(value: number) { method in USBHead
|
D | DataMessage.ts | 46 let dataSize = resultPayloadHead.dataSize; variable 55 if (dataSize > 0) { 56 this._resArrayBuffer = this.body!.buffer.slice(11 + headSize, 11 + headSize + dataSize);
|
/developtools/profiler/proto_encoder/src/ |
D | base_message.cpp | 77 void BaseMessage::AddBytes(uint32_t fieldId, const void* data, uint32_t dataSize) in AddBytes() argument 88 if (!writeCtx_->getMemory(writeCtx_, VARINT_ENCODE_MAX_SIZE + SIZE_RESERVED_LEN + dataSize, in AddBytes() 95 fieldSize += EncodeVarint(fieldMemory + fieldSize, dataSize); in AddBytes() 96 if (dataSize != 0) { in AddBytes() 97 if (memcpy_s(fieldMemory + fieldSize, dataSize, data, dataSize) != EOK) { in AddBytes() 102 fieldSize += dataSize; in AddBytes() 192 int32_t dataSize = getData(writeCtx_); in AddBytesByCallBack() local 193 if (dataSize < 0) { in AddBytesByCallBack() 205 if (dataSize == 0) { in AddBytesByCallBack() 213 EncodeVarintPadding(fieldMemory, dataSize, SIZE_RESERVED_LEN); in AddBytesByCallBack() [all …]
|
/developtools/hdc/src/common/ |
D | usb.cpp | 65 vector<uint8_t> HdcUSBBase::BuildPacketHeader(uint32_t sessionId, uint8_t option, uint32_t dataSize) in BuildPacketHeader() argument 74 head.dataSize = htonl(dataSize); in BuildPacketHeader() 115 uint32_t maybeSize = ntohl(usbPayloadHeader->dataSize); in IsUsbPacketHeader() 153 int HdcUSBBase::CheckPacketOption(HSession hSession, uint8_t *appendData, int dataSize) in CheckPacketOption() argument 159 header->dataSize = ntohl(header->dataSize); in CheckPacketOption() 173 hUSB->payloadSize = header->dataSize; in CheckPacketOption() 180 …USBBase::SendToHdcStream(HSession hSession, uv_stream_t *stream, uint8_t *appendData, int dataSize) in SendToHdcStream() argument 185 if (IsUsbPacketHeader(appendData, dataSize)) { in SendToHdcStream() 186 return CheckPacketOption(hSession, appendData, dataSize); in SendToHdcStream() 191 dataSize, hUSB->payloadSize, childRet); in SendToHdcStream() [all …]
|
D | usb.h | 33 virtual int UsbToHdcProtocol(uv_stream_t *stream, uint8_t *appendData, int dataSize) in UsbToHdcProtocol() argument 37 int SendToHdcStream(HSession hSession, uv_stream_t *stream, uint8_t *appendData, int dataSize); 48 vector<uint8_t> BuildPacketHeader(uint32_t sessionId, uint8_t option, uint32_t dataSize); 49 int CheckPacketOption(HSession hSession, uint8_t *appendData, int dataSize);
|
D | uart.h | 52 uint32_t dataSize; // data size not include head member 73 oss << " dataSize:" << dataSize; in ToDebugString() 75 if (dataSize != 0) { in ToDebugString() 88 dataSize(dataSizeIn), 95 dataSize == r.dataSize and packageIndex == r.packageIndex; 104 if (dataSize != 0) { in UpdateCheckSum() 106 dataCheckSum = std::accumulate(data, data + dataSize, 0u); in UpdateCheckSum() 127 if (dataSize == 0) { in ValidateData() 130 return (dataCheckSum == std::accumulate(data, data + dataSize, 0u)); in ValidateData() 201 virtual int UartToHdcProtocol(uv_stream_t *stream, uint8_t *appendData, int dataSize);
|
D | session.cpp | 320 const int dataSize) in PushAsyncMessage() argument 329 if (dataSize > 0) { in PushAsyncMessage() 330 param->dataSize = dataSize; in PushAsyncMessage() 331 param->data = new uint8_t[param->dataSize](); in PushAsyncMessage() 336 if (memcpy_s((uint8_t *)param->data, param->dataSize, data, dataSize)) { in PushAsyncMessage() 816 const uint8_t *data, const int dataSize) in Send() argument 827 …protectBuf.checkSum = (ENABLE_IO_CHECKSUM && dataSize > 0) ? Base::CalcCheckSum(data, dataSize) : … in Send() 838 payloadHead.dataSize = htonl(dataSize); in Send() 839 int finalBufSize = sizeof(PayloadHead) + s.size() + dataSize; in Send() 848 WRITE_LOG(LOG_WARN, "send copyhead err for dataSize:%d", dataSize); in Send() [all …]
|
D | session.h | 50 uint8_t dataSize; member 93 const int dataSize); 97 …AsyncMessage(const uint32_t sessionId, const uint8_t method, const void *data, const int dataSize); 125 …int8_t> BuildCtrlString(InnerCtrlCommand command, uint32_t channelId, uint8_t *data, int dataSize); 139 uint32_t dataSize; member
|
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/datastructure/ |
D | SignInfo.java | 78 private long dataSize; field in SignInfo 102 public SignInfo(int saltSize, int flags, long dataSize, byte[] salt, byte[] sig) { in SignInfo() argument 105 this.dataSize = dataSize; in SignInfo() 126 this.dataSize = builder.dataSize; in SignInfo() 175 return dataSize; in getDataSize() 201 bf.putLong(this.dataSize); in toByteArray() 299 this.saltSize, this.sigSize, this.flags, this.dataSize, Arrays.toString(this.salt), in toString() 318 private long dataSize; field in SignInfo.SignInfoBuilder 372 public SignInfoBuilder setDataSize(long dataSize) { in setDataSize() argument 373 this.dataSize = dataSize; in setDataSize()
|
/developtools/profiler/proto_encoder/include/ |
D | base_message.h | 232 void AddBytes(uint32_t fieldId, const void* data, uint32_t dataSize); 317 uint32_t dataSize = 0; in AddPackedVarint() local 320 dataSize += EncodeVarint(pData + dataSize, *array); in AddPackedVarint() 324 EncodeVarintPadding(fieldMemory + tagSize, dataSize, lenSize); in AddPackedVarint() 325 size_ += static_cast<int32_t>(tagSize + lenSize + dataSize); in AddPackedVarint() 327 writeCtx_->seek(writeCtx_, fieldOffset + tagSize + lenSize + dataSize); in AddPackedVarint() 347 uint32_t dataSize = arrayCount * sizeof(T); in AddPackedFixed() local 351 if (!writeCtx_->getMemory(writeCtx_, VARINT_ENCODE_MAX_SIZE + SIZE_RESERVED_LEN + dataSize, in AddPackedFixed() 358 tagSize += EncodeVarint(fieldMemory + tagSize, dataSize); in AddPackedFixed() 359 if (memcpy_s(fieldMemory + tagSize, dataSize, array, dataSize) != EOK) { in AddPackedFixed() [all …]
|
/developtools/profiler/device/plugins/ftrace_plugin/include/ |
D | ftrace_parser.h | 90 size_t dataSize, P& parseEventCtx) in HmParseFtraceEvent() argument 92 return ParseFtraceEvent(ftraceEvent, data, dataSize, parseEventCtx); in HmParseFtraceEvent() 144 bool ParseFtraceEvent(T& ftraceEvent, uint8_t data[], size_t dataSize, P& parseEventCtx) in ParseFtraceEvent() argument 146 CHECK_TRUE(dataSize >= parseEventCtx->format.eventSize, false, in ParseFtraceEvent() 150 CHECK_TRUE(ParseFtraceCommonFields(ftraceEvent, data, dataSize, parseEventCtx->format, pid), in ParseFtraceEvent() 184 SubEventParser<T>::GetInstance().ParseEvent(ftraceEvent, data, dataSize, parseEventCtx); in ParseFtraceEvent() 189 …bool ParseFtraceCommonFields(T& ftraceEvent, uint8_t data[], size_t dataSize, const EventFormat& f… in ParseFtraceCommonFields() argument 200 pid = FtraceFieldParser::ParseIntField<int32_t>(fields, index.pid, data, dataSize); in ParseFtraceCommonFields() 202 …onFields->set_type(FtraceFieldParser::ParseIntField<uint32_t>(fields, index.type, data, dataSize)); in ParseFtraceCommonFields() 203 …Fields->set_flags(FtraceFieldParser::ParseIntField<uint32_t>(fields, index.flags, data, dataSize)); in ParseFtraceCommonFields() [all …]
|
/developtools/profiler/hiebpf/include/ |
D | bpf_controller.h | 78 static int HandleEvent(void *ctx, void *data, size_t dataSize); 79 static int DumpEvent(void *ctx, void *data, size_t dataSize); 136 static int DumpFSTraceEvent(BPFController *bpfctlr, void *data, size_t dataSize); 137 static int DumpPFTraceEvent(BPFController *bpfctlr, void *data, size_t dataSize); 138 static int DumpBIOTraceEvent(BPFController *bpfctlr, void *data, size_t dataSize); 139 static int DumpSTRTraceEvent(void *data, size_t dataSize);
|
D | bpf_event_receiver.h | 151 inline int Put(void *data, const size_t dataSize) in Put() argument 153 HHLOGF((data == nullptr or dataSize == 0), "invalid arguments: this should never happen"); in Put() 156 ret = buf_->Put((const char*)data, dataSize); in Put() 157 if (ret == static_cast<int>(dataSize)) { in Put() 160 …HHLOGF((0 <= ret and ret < static_cast<int>(dataSize)), "incomplete data received: this should nev… in Put()
|
/developtools/profiler/hiebpf/src/ |
D | bpf_controller.cpp | 495 int BPFController::HandleEvent(void *ctx, void *data, size_t dataSize) in HandleEvent() argument 508 int ret = receiver->Put(data, dataSize); in HandleEvent() 511 (0 <= ret and ret < static_cast<int>(dataSize)), in HandleEvent() 635 int BPFController::DumpFSTraceEvent(BPFController *bpfctlr, void *data, size_t dataSize) in DumpFSTraceEvent() argument 637 if (dataSize != sizeof(fstrace_cmplt_event_t)) { in DumpFSTraceEvent() 639 << " data size = " << dataSize in DumpFSTraceEvent() 645 if (memcpy_s(&cmpltEvent, sizeof(fstrace_cmplt_event_t), data, dataSize) != EOK) { in DumpFSTraceEvent() 650 << "\ndata size: " << dataSize; in DumpFSTraceEvent() 668 int BPFController::DumpPFTraceEvent(BPFController *bpfctlr, void *data, size_t dataSize) in DumpPFTraceEvent() argument 670 if (dataSize != sizeof(pftrace_cmplt_event_t)) { in DumpPFTraceEvent() [all …]
|
D | ringbuffer.cpp | 111 std::size_t dataSize = DataSize(); in Write() local 112 if (dataSize < len) { in Write() 113 len = dataSize; in Write() 151 auto dataSize = DataSize(); in Get() local 152 if (len > dataSize) { in Get() 292 auto dataSize = DataSize(); in Resize() local 293 if (head_ + dataSize > bufSize_) { in Resize() 302 dataSize - (bufSize_ - head_)) != EOK) { in Resize() 308 if (memcpy_s(newBuf, expandedSize, buffer_ + head_, dataSize) != EOK) { in Resize() 318 tail_ = dataSize; in Resize()
|
D | hhlog.cpp | 149 auto dataSize = buf_->GetDataSize(); in SaveLog() local 150 if (stop_.load() and (dataSize == 0)) { in SaveLog() 153 if (dataSize) { in SaveLog() 154 ssize_t ret = buf_->Write(fd_, dataSize); in SaveLog()
|
/developtools/smartperf_host/ide/test/hdc/message/ |
D | USBHead.test.ts | 52 expect(usbHead.dataSize).toBeFalsy(); 56 usbHead.dataSize = true; 57 expect(usbHead.dataSize).toBeTruthy();
|
D | PayloadHead.test.ts | 61 expect(payloadHead.dataSize).toBeUndefined(); 65 payloadHead.dataSize = true; 66 expect(payloadHead.dataSize).toBeTruthy();
|
/developtools/smartperf_host/trace_streamer/test/unittest/interface/ |
D | split_file_data_test.cpp | 87 uint64_t dataSize = 0; in CheckData() local 90 dataSize += it->originSeg.size; in CheckData() 93 … std::unique_ptr<uint8_t[]> combinedBuf(new uint8_t[dataSize + PROFILE_HEADER + headDataSize]); in CheckData() 113 …bool ret = ts->ParseTraceDataSegment(std::move(combinedBuf), dataSize + PROFILE_HEADER + headDataS… in CheckData() 141 uint64_t dataSize = 0; variable 145 dataSize += itemHtrace.second; 147 profilerHeader.data.length = PROFILE_HEADER + dataSize; 149 … std::unique_ptr<uint8_t[]> combinedBuf = std::make_unique<uint8_t[]>(dataSize + PROFILE_HEADER); 162 … EXPECT_TRUE(ts->ParseTraceDataSegment(std::move(combinedBuf), dataSize + PROFILE_HEADER, 1, 1));
|
/developtools/smartperf_host/ide/src/hdc/hdcclient/ |
D | HdcClient.ts | 74 let handBody = await this.readDataProcessing.readBody(handShake!.dataSize); 93 let dataSize = resultPayloadHead.dataSize; 101 PayloadHead.getPayloadHeadLength() + headSize + dataSize
|
/developtools/hiperf/test/unittest/common/native/ |
D | perf_file_writer_test.cpp | 85 uint64_t dataSize = 0; variable 89 dataSize += recordmmap.GetSize(); 100 ASSERT_EQ(fileWriter.GetDataSize(), dataSize); 121 uint64_t dataSize = 0; variable 125 dataSize += recordmmap.GetSize(); 133 ASSERT_EQ(fileWriter.GetDataSize(), dataSize);
|
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/fsverity/ |
D | MerkleTreeBuilder.java | 148 private static int[] getOffsetArrays(long dataSize, int digestSize) { in getOffsetArrays() argument 149 ArrayList<Long> levelSize = getLevelSize(dataSize, digestSize); in getOffsetArrays() 166 private static ArrayList<Long> getLevelSize(long dataSize, int digestSize) { in getLevelSize() argument 169 long originalDataSize = dataSize; in getLevelSize() 339 private static long getChunkCount(long dataSize, long divisor) { in getChunkCount() argument 340 return (long) Math.ceil((double) dataSize / (double) divisor); in getChunkCount() 351 private static long getFullChunkSize(long dataSize, long divisor, long multiplier) { in getFullChunkSize() argument 352 return getChunkCount(dataSize, divisor) * multiplier; in getFullChunkSize()
|
/developtools/hdc/test/unittest/common/ |
D | uart_test.cpp | 157 head.dataSize = testString.size(); in MakeDemoData() 171 size_t dataSize = data.size() - sizeof(UartHead); in MakeData() local 172 if (memcpy_s(dataPtr, dataSize, testString.data(), testString.size()) != EOK) { in MakeData() 263 ASSERT_EQ(pUARTHead->dataSize, length - sizeof(UartHead)); in __anon7f708f190402() 264 sendOffset += pUARTHead->dataSize; in __anon7f708f190402() 271 for (uint32_t i = 0; i < pUARTHead->dataSize; i++) { in __anon7f708f190402() 275 sourceDataPoint += pUARTHead->dataSize; in __anon7f708f190402() 491 .WillRepeatedly([&](uv_stream_t *stream, uint8_t *data, int dataSize) { in __anon7f708f190702() argument 492 return mockUARTBase.HdcUARTBase::UartToHdcProtocol(stream, data, dataSize); in __anon7f708f190702() 533 testHead.dataSize = dataSizeTest; [all …]
|