/developtools/profiler/device/plugins/ftrace_plugin/test/unittest/ |
D | string_utils_test.cpp | 49 std::string str; in RandomString() local 50 str.reserve(len); in RandomString() 52 str.push_back(RandomChar()); in RandomString() 54 return str; in RandomString() 65 std::string str = "abbcccdefgh.txt"; variable 67 EXPECT_TRUE(StringUtils::EndsWith(str, ext)); 68 EXPECT_TRUE(StringUtils::EndsWith(str, str)); 79 std::string str = "abbcccdefgh.txt"; variable 81 EXPECT_FALSE(StringUtils::EndsWith(str, +".")); 82 EXPECT_FALSE(StringUtils::EndsWith(ext, str)); [all …]
|
D | kernel_symbols_parser_test.cpp | 58 std::string str = std::to_string(RandomNumber()); in RandAddr() local 59 return str; in RandAddr() 64 std::string str; in RandomName() local 65 str.reserve(len + 1); in RandomName() 67 str.push_back(RandomChar()); in RandomName() 70 str + ".cfi"; in RandomName() 72 return str; in RandomName() 77 char str = 't'; in RandomType() local 79 str = 'T'; in RandomType() 81 return str; in RandomType() [all …]
|
/developtools/hdc/src/host/ |
D | ext_client.h | 36 void Version(const std::string &str); 37 static void Help(const std::string &str); 38 void Discover(const std::string &str); 39 void Start(const std::string &str); 40 void Kill(const std::string &str); 41 void ListTargets(const std::string &str); 42 void Connect(const std::string &str); 43 void Shell(const std::string &str); 44 void File(const std::string &str); 45 void Fport(const std::string &str); [all …]
|
D | ext_client.cpp | 113 void ExtClient::Version(const std::string &str) in Version() argument 116 Handle(str, name); in Version() 119 void ExtClient::Help(const std::string &str) in Help() argument 124 void ExtClient::Discover(const std::string &str) in Discover() argument 127 Handle(str, name); in Discover() 130 void ExtClient::Start(const std::string &str) in Start() argument 133 Handle(str, name); in Start() 136 void ExtClient::Kill(const std::string &str) in Kill() argument 139 Handle(str, name); in Kill() 142 void ExtClient::Connect(const std::string &str) in Connect() argument [all …]
|
/developtools/profiler/device/plugins/ftrace_plugin/src/ |
D | string_utils.cpp | 17 bool StringUtils::EndsWith(const std::string& str, const std::string& postfix) in EndsWith() argument 19 if (str.size() < postfix.size()) { in EndsWith() 22 return str.compare(str.size() - postfix.size(), postfix.size(), postfix) == 0; in EndsWith() 25 bool StringUtils::StartsWith(const std::string& str, const std::string& prefix) in StartsWith() argument 27 if (str.size() < prefix.size()) { in StartsWith() 30 return str.compare(0, prefix.size(), prefix) == 0; in StartsWith() 33 bool StringUtils::Contains(const std::string& str, const std::string& target) in Contains() argument 35 return str.find(target) != std::string::npos; in Contains() 38 std::string StringUtils::Strip(const std::string& str) in Strip() argument 42 auto first = str.find_first_not_of(blanks); in Strip() [all …]
|
/developtools/integration_verification/tools/rom_ram_analyzer/lite_small/pkgs/ |
D | basic_tool.py | 28 def unit_adaptive(size: int) -> str: 37 return str(round(size))+unit_list[index] 39 def get_unit(x: str) -> str: argument 45 def translate_str_unit(x: str, dest: str, prefix: str = "~") -> float: argument 47 trans_dict: Dict[str, int] = { 70 …def find_files_with_pattern(cls, folder: str, pattern: str = "/**", recursive: bool = True, apply_… argument 72 post_handler: Callable[[List[str]], List[str]] = None) -> list: argument 93 file_list = sorted(file_list, key=str.lower) 101 …def match_paragraph(cls, content: str, start_pattern: str = r"\w+\(\".*?\"\) *{", end_pattern: str… argument 118 def re_group_1(cls, content: str, pattern: str, **kwargs) -> str: argument [all …]
|
D | gn_common_tool.py | 37 def _find_gn_variable_list(cls, content: str) -> List: argument 57 def is_gn_variable(cls, target: str, quote_processed: bool = False): argument 84 def contains_gn_variable(cls, s: str, quote_processed: bool = False): argument 91 __var_val_mem_dict = collections.defaultdict(str) 94 …def find_variables_in_gn(cls, var_name_tuple: tuple, path: str, stop_tail: str = "home", use_cache… argument 95 List[str]: 110 var_val_dict = collections.defaultdict(str) 138 def replace_gn_variables(cls, s: str, gn_path: str, stop_tail: str) -> str: argument 156 def find_values_of_variable(cls, var_name: str, path: str, stop_tail: str = "home") -> list: argument 185 def string_parser(cls, var: str, content: str) -> str: argument [all …]
|
D | rom_ram_baseline_collector.py | 30 …(cls, result_dict: Dict, subsystem_name: str, component_name: str, rom_size: str, ram_size: str, b… argument 39 def collect(cls, oh_path: str) -> Dict[str, Dict]: argument 50 def post_handler(x:str)->list: argument 55 rom_ram_baseline_dict: Dict[str, Dict] = dict() 58 content: Dict[str, Any] = json.loads(f.read())
|
/developtools/integration_verification/tools/rom_ram_analyzer/standard/ |
D | ram_analyzer.py | 40 def verify_hdc(cls, verify_str: str = "OpenHarmony") -> bool: argument 47 stdout = str(cp.stdout) 48 stderr = str(cp.stderr) 52 def verify_device(cls, device_num: str) -> bool: argument 59 stdout = str(cp.stdout) 60 stderr = str(cp.stderr) 64 def exec(cls, args: list, output_from: str = "stdout"): argument 93 __ss_dict: typing.Dict[str, int] = { 101 …def __parse_hidumper_mem(cls, content: typing.Text, device_num: str, ss: str = "Pss") -> typing.Di… argument 109 def find_full_process_name(hname: str) -> str: argument [all …]
|
/developtools/integration_verification/tools/rom_ram_analyzer/lite_small/src/ |
D | template_processor.py | 42 project_path: str, argument 43 result_dict: Dict[str, Dict[str, Dict]], argument 44 target_type: str, argument 45 match_pattern: str, argument 46 sub_com_dict: Dict[str, Dict[str, str]], argument 48 other_info_handlers: Dict[str, Callable[[ argument 49 Text], Union[str, list]]] = dict(), argument 51 resource_field: str = None, argument 82 def _append(self, key: str, unit: Dict) -> None: argument 91 def _find_sc(self, gn_path: str): argument [all …]
|
D | rom_analysis.py | 66 … def _add_rest_dir(cls, top_dir: str, rela_path: str, sub_path: str, dir_list: List[str]) -> None: argument 104 def _find_files(cls, product_name: str) -> Dict[str, List[str]]: argument 105 product_dir: Dict[str, Dict] = configs[product_name]["product_dir"] 110 product_path_dit: Dict[str, str] = dict() # 存储编译产物的类型及目录 113 relative_dir: Dict[str, str] = product_dir.get("relative") 123 product_dict: Dict[str, List[str]] = dict() # 存储编译产物的名称 129 rest_dir_list: List[str] = os.listdir( 136 cls._add_rest_dir(root_dir, str(), v, rest_dir_list) 145 def collect_product_info(cls, product_name: str): argument 147 product_dict: Dict[str, List[str]] = cls._find_files(product_name) [all …]
|
D | misc.py | 61 def gn_lineno_collect(match_pattern: str, project_path: str) -> DefaultDict[str, List[int]]: argument 71 def handler(content: Text) -> List[str]: 81 gn_line_dict: DefaultDict[str, List[int]] = defaultdict(list) 95 def single_parser(cls, paragraph: Text) -> str: 104 def second_parser(cls, paragraph: Text) -> str: 120 def run(self, unit: Dict[str, AnyStr]) -> str: argument 123 def __call__(self, unit: Dict[str, AnyStr]) -> str: argument 127 def add_prefix(content: str, prefix: str) -> str: argument 133 def add_postfix(content: str, postfix: str) -> str: argument 140 def run(self, unit: Dict[str, AnyStr]): argument [all …]
|
/developtools/profiler/device/plugins/ftrace_plugin/tools/device_kernel_version/default/ |
D | ftrace_cpp_generator.py | 96 return str.lower(name) 162 str.lower(event.name) 276 "{}({},\n".format(Common.format_register_macro, str.lower(event.name)) 283 f.write(" return event.has_{}_format();".format(str.lower(event.name))) 286 f.write(" auto msg = event.{}_format();\n".format(str.lower(event.name))) 289 event.print_fmt = str.replace(event.print_fmt, "%zu", '%" PRIu64 "') 290 event.print_fmt = str.replace(event.print_fmt, "%zd", '%" PRIu64 "') 291 event.print_fmt = str.replace(event.print_fmt, "%llu", '%" PRIu64 "') 292 event.print_fmt = str.replace(event.print_fmt, "%lld", '%" PRIu64 "') 293 event.print_fmt = str.replace(event.print_fmt, "%lx", '%" PRIx64 "') [all …]
|
/developtools/smartperf_host/trace_streamer/src/base/ |
D | string_to_numerical.h | 28 inline uint16_t GetNameASCIISumNoNum(const std::string& str) in GetNameASCIISumNoNum() argument 31 int32_t len = str.length() - 1; in GetNameASCIISumNoNum() 33 sum += std::isdigit(str.at(len)) ? 0 : str.at(len); in GetNameASCIISumNoNum() 47 return ss.str(); 51 std::optional<T> StrToInt(const std::string& str, int32_t base = INTEGER_RADIX_TYPE_DEC) 53 if (!str.empty()) { 57 value = static_cast<T>(std::strtoul(str.c_str(), &endPtr, base)); 59 value = static_cast<T>(std::strtol(str.c_str(), &endPtr, base)); 61 value = static_cast<T>(std::strtoull(str.c_str(), &endPtr, base)); 63 value = static_cast<T>(std::strtoll(str.c_str(), &endPtr, base)); [all …]
|
D | string_help.cpp | 28 bool StartWith(const std::string& str, const std::string& res) in StartWith() argument 30 if (res.size() > str.size()) { in StartWith() 33 return str.compare(0, res.length(), res) == 0; in StartWith() 36 bool EndWith(const std::string& str, const std::string& res) in EndWith() argument 38 if (res.size() > str.size()) { in EndWith() 41 return str.compare(str.size() - res.size(), res.size(), res) == 0; in EndWith() 44 std::vector<std::string> SplitStringToVec(const std::string& str, const std::string& pat) in SplitStringToVec() argument 48 size_t strSize = str.size(); in SplitStringToVec() 51 auto patPos = str.find(pat, curPos); in SplitStringToVec() 55 result.emplace_back(str.substr(curPos, patPos - curPos)); in SplitStringToVec() [all …]
|
/developtools/profiler/host/smartperf/trace_streamer/src/base/ |
D | string_to_numerical.h | 28 inline uint16_t GetNameASCIISumNoNum(const std::string& str) in GetNameASCIISumNoNum() argument 31 int32_t len = str.length() - 1; in GetNameASCIISumNoNum() 33 sum += std::isdigit(str.at(len)) ? 0 : str.at(len); in GetNameASCIISumNoNum() 47 return ss.str(); 51 inline std::optional<T> StrToInt(const std::string& str, int32_t base = INTEGER_RADIX_TYPE_DEC) 53 if (!str.empty()) { 57 value = static_cast<T>(std::strtoul(str.c_str(), &endPtr, base)); 59 value = static_cast<T>(std::strtol(str.c_str(), &endPtr, base)); 61 value = static_cast<T>(std::strtoull(str.c_str(), &endPtr, base)); 63 value = static_cast<T>(std::strtoll(str.c_str(), &endPtr, base)); [all …]
|
D | string_help.cpp | 91 int GetProcessorNumFromString(char* str) in GetProcessorNumFromString() argument 95 char* s = str; in GetProcessorNumFromString() 115 bool StartWith(const std::string& str, const std::string& res) in StartWith() argument 117 if (res.size() > str.size()) { in StartWith() 120 return str.compare(0, res.length(), res) == 0; in StartWith() 123 bool EndWith(const std::string& str, const std::string& res) in EndWith() argument 125 if (res.size() > str.size()) { in EndWith() 128 return str.compare(str.size() - res.size(), res.size(), res) == 0; in EndWith() 131 std::vector<std::string> SplitStringToVec(const std::string& str, const std::string& pat) in SplitStringToVec() argument 135 size_t strSize = str.size(); in SplitStringToVec() [all …]
|
/developtools/profiler/device/plugins/native_hook/src/ |
D | runtime_stack_range.cpp | 57 static long long CvtStrToInt(const char* str, int base) in CvtStrToInt() argument 61 while (*str) { in CvtStrToInt() 62 if (*str >= '0' && *str <= '0' + base - 1) { in CvtStrToInt() 63 result = result * base + static_cast<long long>((*str) - '0'); in CvtStrToInt() 67 ++str; in CvtStrToInt() 70 while (*str) { in CvtStrToInt() 71 if (*str >= '0' && *str <= '0' + base - 1) { in CvtStrToInt() 72 result = result * base + static_cast<long long>(*str) - '0'; in CvtStrToInt() 73 } else if (*str >= 'a' && *str <= 'a' + base - 0x0a - 1) { in CvtStrToInt() 74 result = result * base + static_cast<long long>(*str) - 'a' + 0x0a; in CvtStrToInt() [all …]
|
/developtools/integration_verification/tools/rom_ram_analyzer/standard/pkgs/ |
D | basic_tool.py | 9 def unit_adaptive(size: int) -> str: 18 return str(round(size,2))+unit_list[index] 22 …def match_paragraph(cls, content: str, start_pattern: str = r"\w+\(\".*?\"\) *{", end_pattern: str… argument 39 …def find_all_files(cls, folder: str, real_path: bool = True, apply_abs: bool = True, de_duplicate:… argument 50 filepath_list = sorted(filepath_list, key=str.lower) 54 def get_abs_path(cls, path: str) -> str: argument 58 def re_group_1(cls, content: str, pattern: str, **kwargs) -> str: argument 71 return str() 74 def execute(cls, cmd: str, post_processor: Callable[[Text], Text] = lambda x:x) -> Any: argument
|
D | rom_ram_baseline_collector.py | 32 …cls, result_dict: Dict, subsystem_name: str, component_name: str, rom_size: str, ram_size: str, bu… argument 41 def collect(cls, oh_path: str) -> Dict[str, Dict]: argument 42 def post_handler(x: str) -> list: argument 48 rom_ram_baseline_dict: Dict[str, Dict] = dict() 51 content: Dict[str, Any] = json.loads(f.read())
|
D | gn_common_tool.py | 18 def is_gn_variable(cls, target: str, has_quote: bool = True): argument 44 … def find_variables_in_gn(cls, var_name_tuple: tuple, path: str, stop_tail: str = "home") -> tuple: argument 75 def __find_part_subsystem_from_bundle(cls, gnpath: str, stop_tail: str = "home") -> tuple: argument 108 …var_flag: bool, var_list: List[str], part_cmd: str, subsystem_cmd: str, gn_file: str, project_path… argument 145 def find_part_subsystem(cls, gn_file: str, project_path: str) -> tuple: argument 174 def string_parser(cls, var: str, content: str) -> str: argument 186 def list_parser(cls, var: str, content: str) -> List[str]: argument
|
/developtools/smartperf_host/trace_streamer/test/unittest/ |
D | event_parser_test.cpp | 191 const uint8_t str[] = variable 194 if (memcpy_s(buf.get(), G_BUF_SIZE, str, sizeof(str))) { 215 const uint8_t str[] = variable 219 if (memcpy_s(buf.get(), G_BUF_SIZE, str, sizeof(str))) { 242 const uint8_t str[] = variable 247 if (memcpy_s(buf.get(), G_BUF_SIZE, str, sizeof(str))) { 269 const uint8_t str[] = variable 274 if (memcpy_s(buf.get(), G_BUF_SIZE, str, sizeof(str))) { 296 …const uint8_t str[] = "<idle>-0 (-----) [003] d..2 174330.280761: cpu_idle: state=2 cpu_id=3\n… variable 298 if (memcpy_s(buf.get(), G_BUF_SIZE, str, sizeof(str))) { [all …]
|
/developtools/syscap_codec/tools/ |
D | syscap_check.py | 29 type=str, 35 type=str, 44 type=str, 53 return str(target_list).lstrip("[").rstrip("]").replace(", ", "\n") 66 def bundle_syscap_post_handler(syscap: str) -> str: argument 70 def read_value_from_json(filepath: str, argument 95 def collect_syscap_from_codec(filepath: str, pattern: str = r'{"(.*)"') -> tuple: argument 114 def collect_syscap_from_component(project_path: str, argument 148 def sdk_syscap_post_handler(syscap: str) -> str: argument 152 def collect_syscap_from_sdk(ts_path: str, argument [all …]
|
/developtools/smartperf_host/ide/src/trace/component/trace/base/ |
D | ColorUtils.ts | 72 public static hash(str: string, max: number): number { 79 for (let index: number = 0; index < str.length; index++) { 80 hash ^= str.charCodeAt(index); 104 public static formatNumberComma(str: number): string { 105 if (str === undefined || str === null) return ''; 106 let unit = str >= 0 ? '' : '-'; 107 let l = Math.abs(str).toString().split('').reverse(); 115 public static hashFunc(str: string, depth: number, max: number): number { 121 let st = str.replace(/[0-9]+/g, '');
|
/developtools/profiler/host/smartperf/ide/src/trace/component/trace/base/ |
D | ColorUtils.ts | 58 public static hash(str: string, max: number): number { 65 for (let index: number = 0; index < str.length; index++) { 66 hash ^= str.charCodeAt(index); 90 public static formatNumberComma(str: number): string { 91 if (str === undefined || str === null) return ''; 92 let unit = str >= 0 ? '' : '-'; 93 let l = Math.abs(str).toString().split('').reverse(); 101 public static hashFunc(str: string, depth: number, max: number): number { 107 let st = str.replace(/[0-9]+/g, '');
|