/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/ |
H A D | ByteArrayUtils.java | 47 int pos = index; in insertIntToByteArray() 48 desByte[pos] = (byte) ((num >> TRIPLE_BIT_SIZE) & 0xff); in insertIntToByteArray() 49 pos++; in insertIntToByteArray() 50 desByte[pos] = (byte) ((num >> DOUBLE_BIT_SIZE) & 0xff); in insertIntToByteArray() 51 pos++; in insertIntToByteArray() 52 desByte[pos] = (byte) ((num >> BIT_SIZE) & 0xff); in insertIntToByteArray() 53 pos++; in insertIntToByteArray() 54 desByte[pos] = (byte) (num & 0xff); in insertIntToByteArray() 55 pos++; in insertIntToByteArray() 56 return pos; in insertIntToByteArray() [all...] |
H A D | EscapeCharacter.java | 65 int pos = 0; in unescape() 67 pos = src.indexOf('%', lastPos); in unescape() 68 if (pos == lastPos) { in unescape() 69 if (src.charAt(pos + 1) == 'u') { in unescape() 70 char ch = (char) Integer.parseInt(src.substring(pos + ESCAPE_STRING2_LEN, in unescape() 71 pos + ESCAPE_STRING2_LEN + INTERCEPT2_LEN), RADIX_NUM); in unescape() 73 lastPos = pos + ESCAPE_STRING2_LEN + INTERCEPT2_LEN; in unescape() 75 char ch = (char) Integer.parseInt(src.substring(pos + ESCAPE_STRING1_LEN, in unescape() 76 pos + ESCAPE_STRING1_LEN + INTERCEPT1_LEN), RADIX_NUM); in unescape() 78 lastPos = pos in unescape() [all...] |
/developtools/hapsigner/hapsigntool_cpp/utils/src/ |
H A D | byte_array_utils.cpp | 27 int pos = index; in InsertIntToByteArray() local 28 desByte[pos] = (num >> TRIPLE_BIT_SIZE) & 0xff; in InsertIntToByteArray() 29 pos++; in InsertIntToByteArray() 30 desByte[pos] = (num >> DOUBLE_BIT_SIZE) & 0xff; in InsertIntToByteArray() 31 pos++; in InsertIntToByteArray() 32 desByte[pos] = (num >> BIT_SIZE) & 0xff; in InsertIntToByteArray() 33 pos++; in InsertIntToByteArray() 34 desByte[pos] = num & 0xff; in InsertIntToByteArray() 35 pos++; in InsertIntToByteArray() 36 return pos; in InsertIntToByteArray() 44 int pos = index; InsertShortToByteArray() local [all...] |
/developtools/global_resource_tool/src/ |
H A D | resource_table.cpp | 118 uint64_t pos = 0; in LoadResTable() local 120 if (!ReadFileHeader(in, indexHeader, pos, static_cast<uint64_t>(length))) { in LoadResTable() 126 if (!ReadLimitKeys(in, limitKeys, indexHeader.limitKeyConfigSize, pos, static_cast<uint64_t>(length))) { in LoadResTable() 132 if (!ReadIdTables(in, datas, indexHeader.limitKeyConfigSize, pos, static_cast<uint64_t>(length))) { in LoadResTable() 139 if (!ReadDataRecordPrepare(in, record, pos, static_cast<uint64_t>(length)) || in LoadResTable() 199 uint32_t pos = 0; in SaveToResouorceIndex() local 204 pos += sizeof(IndexHeader); in SaveToResouorceIndex() 208 if (!Prepare(configs, limitKeyConfigs, idSets, pos)) { in SaveToResouorceIndex() 219 if (!SaveRecordItem(configs, outStreamData, idSets, pos)) { in SaveToResouorceIndex() 224 indexHeader.fileSize = pos; in SaveToResouorceIndex() 350 ReadFileHeader(ifstream &in, IndexHeader &indexHeader, uint64_t &pos, uint64_t length) const ReadFileHeader() argument 363 ReadLimitKeys(ifstream &in, map<int64_t, vector<KeyParam>> &limitKeys, uint32_t count, uint64_t &pos, uint64_t length) const ReadLimitKeys() argument 399 ReadIdTables(std::ifstream &in, std::map<int64_t, std::pair<int64_t, int64_t>> &datas, uint32_t count, uint64_t &pos, uint64_t length) const ReadIdTables() argument 433 ReadDataRecordPrepare(ifstream &in, RecordItem &record, uint64_t &pos, uint64_t length) const ReadDataRecordPrepare() argument [all...] |
H A D | file_entry.cpp | 274 string::size_type pos = filePath_.find_first_of(SEPARATE.front(), offset); in GetSegments() local 275 while (pos != string::npos) { in GetSegments() 276 segments.push_back(filePath_.substr(offset, pos - offset)); in GetSegments() 277 offset = pos + 1; in GetSegments() 278 pos = filePath_.find_first_of(SEPARATE.front(), offset); in GetSegments() 331 string::size_type pos = path.find_first_of(SEPARATE.front(), offset); in CreateDirsInner() local 332 if (pos == string::npos) { in CreateDirsInner() 340 string subPath = path.substr(0, pos + 1); in CreateDirsInner() 350 return CreateDirsInner(path, pos + 1); in CreateDirsInner() 364 string::size_type pos in CreateDirsInner() local [all...] |
H A D | resource_util.cpp | 151 string::size_type pos = name.find_last_of("."); in GetIdName() local 152 if (pos != string::npos) { in GetIdName() 153 return name.substr(0, pos); in GetIdName() 185 size_t pos = 0; in DecomposeStrings() local 187 while (pos < length) { in DecomposeStrings() 188 if (pos + HEAD_LENGTH >= length) { in DecomposeStrings() 192 uint16_t size = (content[pos] & 0xff) | ((content[pos + 1] & 0xff) << 8); // Move 8 bits to the left in DecomposeStrings() 193 pos += HEAD_LENGTH; in DecomposeStrings() 195 if (pos in DecomposeStrings() 273 string::size_type pos = 0; StringReplace() local [all...] |
/developtools/ace_js2bundle/ace-loader/plugin/templater/ |
H A D | index.js | 152 const pos = { 161 componentValidator.validateStyle(attrValue, compileResult, pos, relativePath) 164 componentValidator.validateClass(attrValue, compileResult, pos, relativePath) 167 componentValidator.validateId(attrValue, compileResult, pos, relativePath) 170 checkAttrFor(node, attributes, pos); 171 componentValidator.validateFor(attrValue, compileResult, pos, relativePath) 174 componentValidator.validateIf(attrValue, compileResult, false, pos, relativePath) 178 compileResult, pos, relativePath) 181 componentValidator.validateAttrElse(preNode, compileResult, pos, relativePath) 184 componentValidator.validateAppend(attrValue, compileResult, pos, relativePat [all...] |
/developtools/smartperf_host/trace_streamer/src/trace_data/ |
H A D | trace_data_db.cpp | 337 size_t pos = std::string::npos; in ParseCommandLine() local 338 if ((pos = line.find(" ")) != std::string::npos) { in ParseCommandLine() 339 option = line.substr(0, pos); in ParseCommandLine() 340 auto left = line.substr(pos + 1); in ParseCommandLine() 341 while ((pos = left.find(",")) != std::string::npos) { in ParseCommandLine() 342 values.push_back(left.substr(0, pos + 1)); in ParseCommandLine() 343 left = left.substr(pos + 1); in ParseCommandLine() 545 int32_t pos = retSnprintf; in SearchDatabase() local 548 return pos; in SearchDatabase() 550 auto returnvalue = HandleColumnNames(stmt, res, outLen, pos, colCoun in SearchDatabase() 557 HandleColumnNames(sqlite3_stmt *stmt, char *res, int32_t outLen, int32_t pos, int32_t colCount) HandleColumnNames() argument 582 HandleRowData(sqlite3_stmt *stmt, char *res, int32_t outLen, int32_t pos, int32_t colCount) HandleRowData() argument [all...] |
/developtools/hiperf/src/ |
H A D | subcommand.cpp | 113 auto pos = selectTids.begin(); in ExcludeTidsFromSelectTids() local 114 while (pos != selectTids.end()) { in ExcludeTidsFromSelectTids() 115 if (excludeTid == *pos) { in ExcludeTidsFromSelectTids() 116 pos = selectTids.erase(pos); in ExcludeTidsFromSelectTids() 120 ++pos; in ExcludeTidsFromSelectTids() 133 auto pos = selectTids.begin(); in ExcludeThreadsFromSelectTids() local 134 while (pos != selectTids.end()) { in ExcludeThreadsFromSelectTids() 135 std::string threadName = virtualRuntime_.ReadThreadName(*pos, true); in ExcludeThreadsFromSelectTids() 137 pos in ExcludeThreadsFromSelectTids() [all...] |
/developtools/profiler/hiebpf/include/ |
H A D | hiebpf_macros.h | 132 * @pos: the &struct list_head to use as a loop cursor. 136 #define list_for_each(pos, head) \ 137 for (pos = (head)->next; pos != (head); pos = pos->next) 154 #define hlist_for_each(pos, head) \ 155 for (pos = (head)->first; pos ; pos [all...] |
H A D | fstrace_progs.h | 133 int BPF_KPROBE(ksys_pread64_entry, unsigned int fd, char __user* buf, size_t count, loff_t pos) in BPF_KPROBE() argument 151 args->pos = pos; in BPF_KPROBE() 173 int BPF_KPROBE(ksys_pwrite64_entry, unsigned int fd, const char __user* buf, size_t count, loff_t pos) in BPF_KPROBE() argument 191 args->pos = pos; in BPF_KPROBE() 295 unsigned long vlen, loff_t pos, rwf_t flags) in BPF_KPROBE() 313 args->pos = pos; in BPF_KPROBE() 342 unsigned long vlen, loff_t pos, rwf_ in pwritev_entry() 293 BPF_KPROBE(do_preadv_entry, unsigned long fd, const struct iovec __user* vec, unsigned long vlen, loff_t pos, rwf_t flags) BPF_KPROBE() argument 341 pwritev_entry(unsigned long fd, const struct iovec __user* vec, unsigned long vlen, loff_t pos, rwf_t flags) pwritev_entry() argument 384 loff_t pos = pos_from_hilo(pos_h, pos_l); BPF_KPROBE() local 399 loff_t pos = pos_from_hilo(pos_h, pos_l); BPF_KPROBE() local 417 loff_t pos = ((loff_t)pos_high << 32) | pos_low; BPF_KPROBE() local 432 loff_t pos = ((loff_t)pos_high << 32) | pos_low; BPF_KPROBE() local [all...] |
H A D | fstrace_types.h | 45 loff_t pos; member 52 loff_t pos; member 73 loff_t pos; member 81 loff_t pos; member
|
H A D | commandline_flags.h | 276 char* pos = nullptr; in ParseInt8Flag() local 277 long int tmpVal = strtol(valStr.c_str(), &pos, 10); in ParseInt8Flag() 291 char* pos = nullptr; in ParseInt16Flag() local 292 long int tmpVal = strtol(valStr.c_str(), &pos, 10); in ParseInt16Flag() 306 char* pos = nullptr; in ParseInt32Flag() local 307 long int tmpVal = strtol(valStr.c_str(), &pos, 10); in ParseInt32Flag() 321 char* pos = nullptr; in ParseInt64Flag() local 322 long int tmpVal = strtol(valStr.c_str(), &pos, 10); in ParseInt64Flag() 336 char* pos = nullptr; in ParseUint8Flag() local 337 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 1 in ParseUint8Flag() 351 char* pos = nullptr; ParseUint16Flag() local 366 char* pos = nullptr; ParseUint32Flag() local 381 char* pos = nullptr; ParseUint64Flag() local 396 char* pos = nullptr; ParseDoubleFlag() local 453 char* pos = nullptr; ParseInt8ArrayFlag() local 479 char* pos = nullptr; ParseInt16ArrayFlag() local 505 char* pos = nullptr; ParseInt32ArrayFlag() local 531 char* pos = nullptr; ParseInt64ArrayFlag() local 557 char* pos = nullptr; ParseUint8ArrayFlag() local 583 char* pos = nullptr; ParseUint16ArrayFlag() local 609 char* pos = nullptr; ParseUint32ArrayFlag() local 635 char* pos = nullptr; ParseUint64ArrayFlag() local 661 char* pos = nullptr; ParseDoubleArrayFlag() local [all...] |
/developtools/smartperf_host/trace_streamer/sdk/demo_sdk/trace_data/ |
H A D | demo_trace_data_db.cpp | 310 int32_t &pos, in AddColumnsToJsonArray() 313 int32_t retSnprintf = snprintf_s(resValue + pos, outLen - pos, 1, "%s", "{\"columns\":["); in AddColumnsToJsonArray() 317 pos += retSnprintf; in AddColumnsToJsonArray() 320 snprintf_s(resValue + pos, outLen - pos, 1, "%s%s%s", "\"", sqlite3_column_name(stmtSql, i), "\","); in AddColumnsToJsonArray() 324 pos += retSnprintf; in AddColumnsToJsonArray() 326 pos--; // remove the last ',' in AddColumnsToJsonArray() 327 retSnprintf = snprintf_s(resValue + pos, outLen - pos, in AddColumnsToJsonArray() 307 AddColumnsToJsonArray(sqlite3_stmt *stmtSql, char *resValue, const int32_t outLen, int32_t &pos, const int32_t colCount) AddColumnsToJsonArray() argument 334 AddRowsToJsonArray(sqlite3_stmt *stmtSql, char *resValue, const int32_t outLen, int32_t &pos, const int32_t colCount) AddRowsToJsonArray() argument 385 int32_t pos = retSnprintf; DemoSearchDatabase() local [all...] |
/developtools/profiler/device/plugins/ftrace_plugin/src/ |
H A D | printk_formats_parser.cpp | 61 auto pos = line.find(seperator); in Parse() local 62 if (pos != std::string::npos) { in Parse() 63 std::string addrStr = StringUtils::Strip(line.substr(0, pos)); in Parse() 66 symbol = StringUtils::Strip(line.substr(pos + 1)); in Parse()
|
H A D | file_utils.cpp | 87 size_t pos = path.rfind("/"); in WriteFile() local 88 if (pos != std::string::npos) { in WriteFile() 89 std::string dirName = path.substr(0, pos+1); in WriteFile() 90 size_t index = path.length() > (pos + 1) ? path.length() - pos - 1 : 0; in WriteFile() 91 std::string fileName = path.substr(pos+1, index); in WriteFile()
|
/developtools/smartperf_host/trace_streamer/src/parser/rawtrace_parser/ |
H A D | printk_formats_processor.cpp | 51 auto pos = curLine.find(':'); in HandlePrintkSyms() local 52 if (pos == std::string::npos) { in HandlePrintkSyms() 55 std::string addrInfo = base::Strip(curLine.substr(0, pos)); in HandlePrintkSyms() 57 curSymbol = base::Strip(curLine.substr(pos + 1)); in HandlePrintkSyms()
|
/developtools/profiler/hiebpf/src/ |
H A D | utilities.cpp | 43 size_t pos = 0; in StringSplit() local 44 while ((pos = source.find(split)) != std::string::npos) { in StringSplit() 46 std::string token = source.substr(0, pos); in StringSplit() 50 source.erase(0, pos + split.length()); in StringSplit()
|
/developtools/hapsigner/hapsigntool_cpp/codesigning/datastructure/src/ |
H A D | native_lib_info_segment.cpp | 130 for (SignedFilePos &pos : inSignedFilePosList) { in FromByteArray() 131 std::vector<char> fileNameBuffer(pos.GetFileNameSize(), 0); in FromByteArray() 132 fileNameListSize += pos.GetFileNameSize(); in FromByteArray() 133 bf->SetPosition(pos.GetFileNameOffset()); in FromByteArray() 143 for (SignedFilePos &pos : inSignedFilePosList) { in FromByteArray() 144 if (pos.GetSignInfoOffset() % ALIGNMENT_FOR_SIGNINFO != 0) { in FromByteArray() 149 std::vector<int8_t> signInfoBuffer(pos.GetSignInfoSize()); in FromByteArray() 150 bf->SetPosition(pos.GetSignInfoOffset()); in FromByteArray() 214 for (SignedFilePos &pos : signedFilePosList) { in GenerateList() 215 pos in GenerateList() [all...] |
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/datastructure/ |
H A D | NativeLibInfoSegment.java | 158 for (SignedFilePos pos : this.signedFilePosList) { in generateList() 159 pos.increaseFileNameOffset(fileNameOffsetBase); in generateList() 160 pos.increaseSignInfoOffset(signInfoOffsetBase + this.zeroPadding.length); in generateList() 234 for (SignedFilePos pos : inSignedFilePosList) { in fromByteArray() 235 byte[] fileNameBuffer = new byte[pos.getFileNameSize()]; in fromByteArray() 236 fileNameListSize += pos.getFileNameSize(); in fromByteArray() 237 bf.position(pos.getFileNameOffset()); in fromByteArray() 247 for (SignedFilePos pos : inSignedFilePosList) { in fromByteArray() 248 if (pos.getSignInfoOffset() % ALIGNMENT_FOR_SIGNINFO != 0) { in fromByteArray() 251 byte[] signInfoBuffer = new byte[pos in fromByteArray() [all...] |
/developtools/profiler/device/plugins/native_hook/src/ |
H A D | hook_socket_client.cpp | 39 size_t pos; member 64 if (strncpy_s(opt->buf + opt->pos, MEMCHECK_DETAILINFO_MAXSIZE - opt->pos, in NmdWriteStat() 68 opt->pos += nmdTimeLen; in NmdWriteStat() 71 if (len + opt->pos + 1 > MEMCHECK_DETAILINFO_MAXSIZE) { in NmdWriteStat() 74 if (strncpy_s(opt->buf + opt->pos, MEMCHECK_DETAILINFO_MAXSIZE - opt->pos, buf, len) != EOK) { in NmdWriteStat() 77 opt->pos += len; in NmdWriteStat()
|
/developtools/profiler/host/smartperf/client/client_command/ |
H A D | heartbeat.cpp | 37 size_t pos = resultPid.find(' '); in KillSpId() local 39 token = resultPid.substr(0, pos); in KillSpId() 41 resultPid.erase(0, pos + 1); in KillSpId() 42 } while ((pos = resultPid.find(' ')) != std::string::npos); in KillSpId()
|
/developtools/global_resource_tool/include/ |
H A D | resource_table.h | 70 std::map<std::string, IdSet> &idSets, uint32_t &pos) const; 72 std::map<std::string, IdSet> &idSets, uint32_t &pos) const; 77 bool ReadFileHeader(std::ifstream &in, IndexHeader &indexHeader, uint64_t &pos, uint64_t length) const; 79 uint32_t count, uint64_t &pos, uint64_t length) const; 81 uint32_t count, uint64_t &pos, uint64_t length) const; 82 bool ReadDataRecordPrepare(std::ifstream &in, RecordItem &record, uint64_t &pos, uint64_t length) const;
|
/developtools/profiler/device/plugins/api/src/ |
H A D | plugin_watcher.cpp | 77 size_t pos = fileName.rfind(".so"); in ScanPlugins() local 78 if (pos != std::string::npos && (pos == fileName.length() - strlen(".so"))) { in ScanPlugins() 122 size_t pos = fileName.rfind(".so"); in MonitorIsSet() local 123 if ((pos == std::string::npos) || (pos != fileName.length() - strlen(".so"))) { in MonitorIsSet()
|
/developtools/packing_tool/adapter/ohos/ |
H A D | CollectBinInfo.java | 123 long pos = fileDataPos; in readBinFileData() 124 while (pos < fileSize) { in readBinFileData() 135 binStream.seek(pos + INT_LENGTH + nameLen + INT_LENGTH + relativePathLen); in readBinFileData() 142 pos = pos + INT_LENGTH + nameLen + INT_LENGTH + relativePathLen + LONG_LENGTH + dataLen; in readBinFileData()
|