Lines Matching refs:str

18 int parse_nsec_time(const char *str, u64 *ptime)  in parse_nsec_time()  argument
23 time_sec = strtoull(str, &end, 10); in parse_nsec_time()
70 char *d, *str; in split_start_end() local
76 str = strdup(ostr); in split_start_end()
77 if (str == NULL) in split_start_end()
80 start_str = str; in split_start_end()
124 char *str, *arg, *p; in perf_time__parse_strs() local
136 str = strdup(ostr); in perf_time__parse_strs()
137 if (!str) in perf_time__parse_strs()
141 for (i = 0, p = str; i < num - 1; i++) { in perf_time__parse_strs()
175 free(str); in perf_time__parse_strs()
180 static int parse_percent(double *pcnt, char *str) in parse_percent() argument
185 c = strchr(str, '%'); in parse_percent()
191 d = strtod(str, &endptr); in parse_percent()
192 if (endptr != str + strlen(str)) in parse_percent()
218 static int percent_slash_split(char *str, struct perf_time_interval *ptime, in percent_slash_split() argument
231 p = strchr(str, '/'); in percent_slash_split()
236 if (parse_percent(&pcnt, str) < 0) in percent_slash_split()
253 static int percent_dash_split(char *str, struct perf_time_interval *ptime, in percent_dash_split() argument
264 ret = split_start_end(&start_str, &end_str, str, '-'); in percent_dash_split()
286 char *str, *p1, *p2; in percent_comma_split() local
289 str = strdup(ostr); in percent_comma_split()
290 if (str == NULL) in percent_comma_split()
293 len = strlen(str); in percent_comma_split()
294 p1 = str; in percent_comma_split()
296 while (p1 < str + len) { in percent_comma_split()
298 free(str); in percent_comma_split()
308 free(str); in percent_comma_split()
323 free(str); in percent_comma_split()
330 char *str; in one_percent_convert() local
343 str = malloc(len + 3); in one_percent_convert()
344 if (str == NULL) in one_percent_convert()
347 memcpy(str, ostr, len); in one_percent_convert()
348 strcpy(str + len, "/1"); in one_percent_convert()
350 ret = percent_slash_split(str, ptime_buf, start, end); in one_percent_convert()
354 free(str); in one_percent_convert()