| /tools/testing/selftests/rcutorture/bin/ |
| A D | kvm-transform.sh | 86 line = ""; 88 if (line == "") { 89 line = $i; 91 line = line " " $i; 95 line = line " file:" consolelog; 98 line = line " " image; 124 if (line == "") 127 line = line " " lq arg; 130 line = line " " bootarg[j]; 131 line = line rq; [all …]
|
| /tools/testing/selftests/ftrace/test.d/trigger/ |
| A D | trigger-trace-marker-snapshot.tc | 16 cat $file | while read line; do 17 comment=`echo $line | sed -e 's/^#//'` 18 if [ "$line" != "$comment" ]; then 21 echo "testing $line for >$x<" 22 match=`echo $line | sed -e "s/>$x<//"` 23 if [ "$line" = "$match" ]; then 24 fail "$line does not have >$x< in it"
|
| /tools/perf/tests/shell/lib/ |
| A D | probe_vfs_getname.sh | 17 …line=$(perf probe -L getname_flags 2>&1 | grep -E "$result_initname_re" | sed -r "s/$result_initna… 21 if [ -z "$line" ] ; then 23 …line=$(perf probe -L getname_flags 2>&1 | grep -E "$result_filename_re" | sed -r "s/$result_filena… 26 if [ -z "$line" ] ; then 28 …line=$(perf probe -L getname_flags 2>&1 | grep -E "$result_aname_re" | sed -r "s/$result_aname_re/… 31 if [ -z "$line" ] ; then 36 perf probe -q "vfs_getname=getname_flags:${line} pathname=result->name:string" || \ 37 …perf probe $add_probe_verbose "vfs_getname=getname_flags:${line} pathname=filename:ustring" || ret…
|
| /tools/perf/arch/riscv/util/ |
| A D | header.c | 20 static char *_get_field(const char *line) in _get_field() argument 24 line2 = strrchr(line, ' '); in _get_field() 29 nl = strrchr(line, '\n'); in _get_field() 38 char *line = NULL; in _get_cpuid() local 51 while ((read = getline(&line, &line_sz, cpuinfo)) != -1) { in _get_cpuid() 52 if (!strncmp(line, CPUINFO_MVEN, strlen(CPUINFO_MVEN))) { in _get_cpuid() 53 mvendorid = _get_field(line); in _get_cpuid() 56 } else if (!strncmp(line, CPUINFO_MARCH, strlen(CPUINFO_MARCH))) { in _get_cpuid() 57 marchid = _get_field(line); in _get_cpuid() 60 } else if (!strncmp(line, CPUINFO_MIMP, strlen(CPUINFO_MIMP))) { in _get_cpuid() [all …]
|
| /tools/perf/util/ |
| A D | drm_pmu.c | 82 while (isspace(line[i])) in add_drm_pmu() 85 line[--i] = '_'; in add_drm_pmu() 86 line[--i] = 'm'; in add_drm_pmu() 87 line[--i] = 'r'; in add_drm_pmu() 88 line[--i] = 'd'; in add_drm_pmu() 89 name = &line[i]; in add_drm_pmu() 150 tmp[*num_events].name = strndup(line, colon - line); in add_event() 163 char *line = NULL; in read_drm_pmus_cb() local 246 free(line); in read_drm_pmus_cb() 580 char *line = NULL; in read_drm_event() local [all …]
|
| A D | find-map.c | 5 char line[128]; in find_map() local 14 while (!found && fgets(line, sizeof(line), maps)) { in find_map() 18 if (2 != sscanf(line, "%p-%p r-xp %*x %*x:%*x %*u %n", in find_map() 24 if (!strncmp(&line[m], name, strlen(name))) in find_map()
|
| /tools/sound/ |
| A D | dapm-graph | 114 read line 116 if echo "${line}" | grep -q ': On ' 122 while read line; do 124 if echo "${line}" | grep -q '^widget-type '; then 125 local w_type_raw="$(echo "$line" | cut -d ' ' -f 2)" 136 if echo "${line}" | grep -q '^in '; then 137 local w_route=$(echo "$line" | awk -F\" '{print $2}') 138 local w_src=$(echo "$line" |
|
| /tools/bootconfig/scripts/ |
| A D | ftrace.sh | 23 while read line; do 24 cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["` 25 file=`echo $line | cut -f1 -d:` 29 while read line; do 30 cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["` 31 file=`echo $line | cut -f1 -d:` 45 while read line; do 46 echo 0 > `echo $line | cut -f1 -d:` 84 while read line; do 85 echo "!$line" >> synthetic_events
|
| /tools/testing/selftests/mseal_system_mappings/ |
| A D | sysmap_is_sealed.c | 23 char line[MAX_LINE_LEN]; in has_mapping() local 25 while (fgets(line, sizeof(line), maps)) { in has_mapping() 26 if (strstr(line, name)) in has_mapping() 35 char line[MAX_LINE_LEN]; in mapping_is_sealed() local 37 while (fgets(line, sizeof(line), maps)) { in mapping_is_sealed() 38 if (!strncmp(line, VMFLAGS, strlen(VMFLAGS))) { in mapping_is_sealed() 39 if (strstr(line, MSEAL_FLAGS)) in mapping_is_sealed()
|
| /tools/perf/arch/loongarch/util/ |
| A D | header.c | 27 static char *_get_field(const char *line) in _get_field() argument 31 line2 = strrchr(line, ' '); in _get_field() 36 nl = strrchr(line, '\n'); in _get_field() 46 char *line, *model, *cpuid; in _get_cpuid() local 53 line = model = cpuid = NULL; in _get_cpuid() 54 while (getline(&line, &line_sz, file) != -1) { in _get_cpuid() 55 if (strncmp(line, CPUINFO_MODEL, strlen(CPUINFO_MODEL))) in _get_cpuid() 58 model = _get_field(line); in _get_cpuid()
|
| /tools/perf/tests/shell/ |
| A D | daemon.sh | 7 local line=$1 15 line_name=`echo "${line}" | awk 'BEGIN { FS = ":" } ; { print $2 }'` 53 local line=$1 117 local line 118 line=`perf daemon --config ${config} -x: | head -1` 184 local line 185 line=`perf daemon --config ${config} -x: | head -1` 190 local line 198 local line 239 local line [all …]
|
| A D | stat+std_output.sh | 48 while read line 51 x=${line:0:1} 54 [ "$line" = "" ] && continue 56 x=${line:0:25} 59 [[ "$line" == *"time elapsed"* ]] && break 61 main_body=$(echo $line | cut -d' ' -f$prefix-) 81 echo "Unknown event name in $line" 1>&2 88 echo "wrong event metric. expected ${event_metric[$i]} in $line" 1>&2
|
| A D | stat+csv_output.sh | 50 while read line 53 x=${line:0:1} 56 [ "$line" = "" ] && continue 59 x=$(echo $line | tr -d -c $csv_sep) 63 echo "wrong number of fields. expected $exp in $line" 1>&2
|
| /tools/perf/arch/s390/util/ |
| A D | header.c | 32 char *cp, *line = NULL, *line2; in get_cpuid() local 60 while ((read = getline(&line, &line_sz, sysinfo)) != -1) { in get_cpuid() 61 if (!strncmp(line, SYSINFO_MANU, strlen(SYSINFO_MANU))) { in get_cpuid() 62 line2 = line + strlen(SYSINFO_MANU); in get_cpuid() 70 if (!strncmp(line, SYSINFO_TYPE, strlen(SYSINFO_TYPE))) { in get_cpuid() 71 line2 = line + strlen(SYSINFO_TYPE); in get_cpuid() 80 line2 = line + strlen(SYSINFO_MODEL); in get_cpuid() 103 while ((read = getline(&line, &line_sz, sysinfo)) != -1) { in get_cpuid() 104 if (strncmp(line, SRVLVL_CPUMF, strlen(SRVLVL_CPUMF))) in get_cpuid() 107 line2 = line + strlen(SRVLVL_CPUMF); in get_cpuid() [all …]
|
| /tools/verification/rvgen/rvgen/ |
| A D | ltl2k.py | 10 def line_len(line: str) -> int: 11 tabs = line.count('\t') 12 return tabs * 7 + len(line) 16 while line_len(line) > COLUMN_LIMIT: 17 i = line[:COLUMN_LIMIT - line_len(line)].rfind(' ') 18 result.append(line[:i]) 19 line = indent + line[i + 1:] 20 if line: 21 result.append(line) 133 for line in buf: [all …]
|
| A D | dot2c.py | 32 for line in buff: 33 string = string + line + "\n" 165 line = "\t\t{\n" if linetoolong else "\t\t{ " 172 line += "\t\t\t%s" % next_state 174 line += "%*s" % (maxlen, next_state) 179 buff.append(line) 202 line = "" 206 line = line + ', ' 211 line = line + '1' 213 line = line + '0' [all …]
|
| A D | automata.py | 55 line = dot_lines[cursor].split() 57 if (line[0] != "digraph") and (line[1] != "state_automaton"): 89 line = self.__dot_lines[cursor].split() 90 raw_state = line[-1] 129 line = self.__dot_lines[cursor].split() 130 event = line[-2].replace('"','') 167 line = self.__dot_lines[cursor].split() 168 origin_state = line[0].replace('"','').replace(',','_') 169 dest_state = line[2].replace('"','').replace(',','_') 170 possible_events = line[-2].replace('"','').replace("\\n", " ")
|
| /tools/testing/selftests/mm/ |
| A D | mlock2.h | 21 char *line = NULL; in seek_to_smaps_entry() local 34 while (getline(&line, &size, file) > 0) { in seek_to_smaps_entry() 35 if (sscanf(line, "%lx-%lx %s %lx %s %lu %s\n", in seek_to_smaps_entry() 43 free(line); in seek_to_smaps_entry() 44 line = NULL; in seek_to_smaps_entry() 52 free(line); in seek_to_smaps_entry()
|
| A D | mlock-random-test.c | 52 char line[1024] = {0}; in get_proc_locked_vm_size() local 59 while (fgets(line, 1024, f)) { in get_proc_locked_vm_size() 60 if (strstr(line, "VmLck")) { in get_proc_locked_vm_size() 65 line, ret); in get_proc_locked_vm_size() 87 char *line; in get_proc_page_size() local 95 while (getline(&line, &size, smaps) > 0) { in get_proc_page_size() 96 if (!strstr(line, "MMUPageSize")) { in get_proc_page_size() 97 free(line); in get_proc_page_size() 98 line = NULL; in get_proc_page_size() 106 line); in get_proc_page_size() [all …]
|
| /tools/testing/selftests/powerpc/benchmarks/ |
| A D | null_syscall.c | 68 char line[128]; in get_proc_frequency() local 83 while (fgets(line, sizeof(line), f) != NULL) { in get_proc_frequency() 84 if (strncmp(line, "timebase", 8) == 0) { in get_proc_frequency() 85 p = strchr(line, ':'); in get_proc_frequency() 93 if (((strncmp(line, "clock", 5) == 0) || in get_proc_frequency() 94 (strncmp(line, "cpu MHz", 7) == 0))) { in get_proc_frequency() 95 p = strchr(line, ':'); in get_proc_frequency()
|
| /tools/lib/api/ |
| A D | io.h | 156 char *line = NULL, *temp; in io__getdelim() local 169 temp = realloc(line, line_len + sizeof(buf)); in io__getdelim() 172 line = temp; in io__getdelim() 173 memcpy(&line[line_len], buf, sizeof(buf)); in io__getdelim() 179 temp = realloc(line, line_len + buf_pos + 1); in io__getdelim() 182 line = temp; in io__getdelim() 183 memcpy(&line[line_len], buf, buf_pos); in io__getdelim() 184 line[line_len + buf_pos] = '\0'; in io__getdelim() 186 *line_out = line; in io__getdelim() 190 free(line); in io__getdelim()
|
| /tools/testing/selftests/memfd/ |
| A D | common.c | 22 char *line = NULL; in default_huge_page_size() local 28 while (getline(&line, &linelen, f) > 0) { in default_huge_page_size() 29 if (sscanf(line, "Hugepagesize: %lu kB", &hps) == 1) { in default_huge_page_size() 35 free(line); in default_huge_page_size()
|
| /tools/testing/kunit/ |
| A D | kunit_config.py | 90 for line in blob.split('\n'): 91 line = line.strip() 92 if not line: 95 match = config_matcher.match(line) 100 empty_match = is_not_set_matcher.match(line) 105 if line[0] == '#': 107 raise KconfigParseError('Failed to parse: ' + line)
|
| /tools/perf/arch/x86/util/ |
| A D | tsc.c | 31 char *line = NULL; in cpuinfo_tsc_freq() local 39 while (getline(&line, &len, cpuinfo) > 0) { in cpuinfo_tsc_freq() 40 if (!strncmp(line, "model name", 10)) { in cpuinfo_tsc_freq() 41 char *pos = strstr(line + 11, " @ "); in cpuinfo_tsc_freq() 55 free(line); in cpuinfo_tsc_freq()
|
| /tools/testing/selftests/x86/ |
| A D | test_mremap_vdso.c | 66 char line[MAX_LINE_LEN]; in vdso_sealed() local 69 while (fgets(line, sizeof(line), maps)) { in vdso_sealed() 70 if (strstr(line, VDSO_NAME)) in vdso_sealed() 73 if (has_vdso && !strncmp(line, VMFLAGS, strlen(VMFLAGS))) { in vdso_sealed() 74 if (strstr(line, MSEAL_FLAGS)) in vdso_sealed()
|