Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 234) sorted by relevance

12345678910

/tools/testing/selftests/powerpc/pmu/
Dper_event_excludes.c27 int i; in per_event_excludes() local
70 for (i = 1; i < 4; i++) in per_event_excludes()
71 FAIL_IF(event_open_with_group(&events[i], events[0].fd)); in per_event_excludes()
80 for (i = 0; i < INT_MAX; i++) in per_event_excludes()
85 for (i = 0; i < 4; i++) { in per_event_excludes()
86 FAIL_IF(event_read(&events[i])); in per_event_excludes()
87 event_report(&events[i]); in per_event_excludes()
94 for (i = 0; i < 4; i++) in per_event_excludes()
95 FAIL_IF(events[i].result.running != events[i].result.enabled); in per_event_excludes()
102 for (i = 1; i < 4; i++) in per_event_excludes()
[all …]
/tools/perf/util/
Dvalues.c28 int i; in perf_read_values_destroy() local
33 for (i = 0; i < values->threads; i++) in perf_read_values_destroy()
34 zfree(&values->value[i]); in perf_read_values_destroy()
39 for (i = 0; i < values->counters; i++) in perf_read_values_destroy()
40 zfree(&values->countername[i]); in perf_read_values_destroy()
60 int i; in perf_read_values__findnew_thread() local
62 for (i = 0; i < values->threads; i++) in perf_read_values__findnew_thread()
63 if (values->pid[i] == pid && values->tid[i] == tid) in perf_read_values__findnew_thread()
64 return i; in perf_read_values__findnew_thread()
69 i = values->threads++; in perf_read_values__findnew_thread()
[all …]
Dthread_map.c29 int i; in thread_map__new_by_pid() local
38 for (i = 0; i < items; i++) in thread_map__new_by_pid()
39 threads->map[i] = atoi(namelist[i]->d_name); in thread_map__new_by_pid()
43 for (i=0; i<items; i++) in thread_map__new_by_pid()
44 zfree(&namelist[i]); in thread_map__new_by_pid()
65 int max_threads = 32, items, i; in thread_map__new_by_uid() local
117 for (i = 0; i < items; i++) in thread_map__new_by_uid()
118 threads->map[threads->nr + i] = atoi(namelist[i]->d_name); in thread_map__new_by_uid()
120 for (i = 0; i < items; i++) in thread_map__new_by_uid()
121 zfree(&namelist[i]); in thread_map__new_by_uid()
[all …]
Dhelp.c22 unsigned int i; in clean_cmdnames() local
24 for (i = 0; i < cmds->cnt; ++i) in clean_cmdnames()
25 zfree(&cmds->names[i]); in clean_cmdnames()
40 unsigned int i, j; in uniq() local
45 for (i = j = 1; i < cmds->cnt; i++) in uniq()
46 if (strcmp(cmds->names[i]->name, cmds->names[i-1]->name)) in uniq()
47 cmds->names[j++] = cmds->names[i]; in uniq()
80 int i, j; in pretty_print_string_list() local
89 for (i = 0; i < rows; i++) { in pretty_print_string_list()
93 unsigned int n = j * rows + i; in pretty_print_string_list()
[all …]
/tools/testing/selftests/rcutorture/bin/
Dkvm-recheck.sh33 for i in $dirs
38 resdir=`echo $i | sed -e 's,/$,,' -e 's,/[^/]*$,,'`
41 TORTURE_SUITE="`cat $i/../TORTURE_SUITE`"
42 kvm-recheck-${TORTURE_SUITE}.sh $i
43 if test -f "$i/console.log"
45 configcheck.sh $i/.config $i/ConfigFragment
46 parse-build.sh $i/Make.out $configfile
47 parse-torture.sh $i/console.log $configfile
48 parse-console.sh $i/console.log $configfile
49 if test -r $i/Warnings
[all …]
/tools/perf/
Dbuiltin-list.c21 int i; in cmd_list() local
40 for (i = 0; i < argc; ++i) { in cmd_list()
41 if (i) in cmd_list()
43 if (strncmp(argv[i], "tracepoint", 10) == 0) in cmd_list()
45 else if (strcmp(argv[i], "hw") == 0 || in cmd_list()
46 strcmp(argv[i], "hardware") == 0) in cmd_list()
48 else if (strcmp(argv[i], "sw") == 0 || in cmd_list()
49 strcmp(argv[i], "software") == 0) in cmd_list()
51 else if (strcmp(argv[i], "cache") == 0 || in cmd_list()
52 strcmp(argv[i], "hwcache") == 0) in cmd_list()
[all …]
/tools/testing/selftests/breakpoints/
Dbreakpoint_test.c146 int i; in write_var() local
148 for (i = 0; i < 4; i++) { in write_var()
151 pcval = (char *)&dummy_var[i]; in write_var()
155 psval = (short *)&dummy_var[i]; in write_var()
159 pival = (int *)&dummy_var[i]; in write_var()
163 plval = (long long *)&dummy_var[i]; in write_var()
174 int i; in read_var() local
176 for (i = 0; i < 4; i++) { in read_var()
179 cval = *(char *)&dummy_var[i]; in read_var()
182 sval = *(short *)&dummy_var[i]; in read_var()
[all …]
/tools/testing/selftests/vm/
Dmap_hugetlb.c41 unsigned long i; in write_bytes() local
43 for (i = 0; i < LENGTH; i++) in write_bytes()
44 *(addr + i) = (char)i; in write_bytes()
49 unsigned long i; in read_bytes() local
52 for (i = 0; i < LENGTH; i++) in read_bytes()
53 if (*(addr + i) != (char)i) { in read_bytes()
54 printf("Mismatch at %lu\n", i); in read_bytes()
Dhugepage-shm.c57 unsigned long i; in main() local
76 for (i = 0; i < LENGTH; i++) { in main()
77 shmaddr[i] = (char)(i); in main()
78 if (!(i % (1024 * 1024))) in main()
84 for (i = 0; i < LENGTH; i++) in main()
85 if (shmaddr[i] != (char)i) { in main()
86 printf("\nIndex %lu mismatched\n", i); in main()
Dhugepage-mmap.c45 unsigned long i; in write_bytes() local
47 for (i = 0; i < LENGTH; i++) in write_bytes()
48 *(addr + i) = (char)i; in write_bytes()
53 unsigned long i; in read_bytes() local
56 for (i = 0; i < LENGTH; i++) in read_bytes()
57 if (*(addr + i) != (char)i) { in read_bytes()
58 printf("Mismatch at %lu\n", i); in read_bytes()
Dthuge-gen.c61 int i; in find_pagesizes() local
64 for (i = 0; i < g.gl_pathc; i++) { in find_pagesizes()
65 sscanf(g.gl_pathv[i], "/sys/kernel/mm/hugepages/hugepages-%lukB", in find_pagesizes()
66 &page_sizes[i]); in find_pagesizes()
67 page_sizes[i] <<= 10; in find_pagesizes()
68 printf("Found %luMB\n", page_sizes[i] >> 20); in find_pagesizes()
170 struct shm_info i; in test_shmget() local
171 if (shmctl(id, SHM_INFO, (void *)&i) < 0) err("shmctl"); in test_shmget()
172 Dprintf("alloc %lu res %lu\n", i.shm_tot, i.shm_rss); in test_shmget()
194 int i; in sanity_checks() local
[all …]
/tools/perf/bench/
Dfutex-hash.c61 unsigned int i; in workerfn() local
72 for (i = 0; i < nfutexes; i++, w->ops++) { in workerfn()
79 ret = futex_wait(&w->futex[i], 1234, NULL, futex_flag); in workerfn()
115 unsigned int i, ncpus; in bench_futex_hash() local
152 for (i = 0; i < nthreads; i++) { in bench_futex_hash()
153 worker[i].tid = i; in bench_futex_hash()
154 worker[i].futex = calloc(nfutexes, sizeof(*worker[i].futex)); in bench_futex_hash()
155 if (!worker[i].futex) in bench_futex_hash()
159 CPU_SET(i % ncpus, &cpu); in bench_futex_hash()
165 ret = pthread_create(&worker[i].thread, &thread_attr, workerfn, in bench_futex_hash()
[all …]
Dsched-messaging.c86 unsigned int i, j; in sender() local
91 for (i = 0; i < loops; i++) { in sender()
113 unsigned int i; in receiver() local
122 for (i = 0; i < ctx->num_packets; i++) { in receiver()
198 unsigned int i; in group() local
205 for (i = 0; i < num_fds; i++) { in group()
222 pth[i] = create_worker(ctx, (void *)receiver); in group()
224 snd_ctx->out_fds[i] = fds[1]; in group()
230 for (i = 0; i < num_fds; i++) { in group()
235 pth[num_fds+i] = create_worker(snd_ctx, (void *)sender); in group()
[all …]
Dmem-memset.c124 int i; in do_memset_cycle() local
132 for (i = 0; i < iterations; ++i) in do_memset_cycle()
133 fn(dst, i, len); in do_memset_cycle()
144 int i; in do_memset_gettimeofday() local
152 for (i = 0; i < iterations; ++i) in do_memset_gettimeofday()
153 fn(dst, i, len); in do_memset_gettimeofday()
178 int i; in bench_mem_memset() local
208 for (i = 0; routines[i].name; i++) { in bench_mem_memset()
209 if (!strcmp(routines[i].name, routine)) in bench_mem_memset()
212 if (!routines[i].name) { in bench_mem_memset()
[all …]
/tools/lib/traceevent/
Dplugin_function.c61 int i; in add_child() local
80 for (i = stack->size; i < stack->size + STK_BLK; i++) in add_child()
81 stack->stack[i] = NULL; in add_child()
90 int i; in add_and_get_index() local
107 for (i = cpus + 1; i <= cpu; i++) in add_and_get_index()
108 memset(&fstack[i], 0, sizeof(fstack[i])); in add_and_get_index()
112 for (i = 0; i < fstack[cpu].size && fstack[cpu].stack[i]; i++) { in add_and_get_index()
113 if (strcmp(parent, fstack[cpu].stack[i]) == 0) { in add_and_get_index()
114 add_child(&fstack[cpu], child, i+1); in add_and_get_index()
115 return i; in add_and_get_index()
[all …]
/tools/testing/selftests/powerpc/pmu/ebb/
Dmulti_counter_test.c19 int i, group_fd; in multi_counter() local
29 for (i = 1; i < 6; i++) in multi_counter()
30 event_ebb_init(&events[i]); in multi_counter()
33 for (i = 0; i < 6; i++) { in multi_counter()
34 events[i].attr.exclude_kernel = 1; in multi_counter()
35 events[i].attr.exclude_hv = 1; in multi_counter()
36 events[i].attr.exclude_idle = 1; in multi_counter()
38 FAIL_IF(event_open_with_group(&events[i], group_fd)); in multi_counter()
80 for (i = 0; i < 6; i++) in multi_counter()
81 event_close(&events[i]); in multi_counter()
/tools/thermal/tmon/
Dsysfs.c119 int i; in str_to_trip_type() local
121 for (i = 0; i < NR_THERMAL_TRIP_TYPE; i++) { in str_to_trip_type()
122 if (!strcmp(name, trip_type_name[i])) in str_to_trip_type()
123 return i; in str_to_trip_type()
159 int i = 0; in get_instance_id() local
163 ++i; in get_instance_id()
164 syslog(LOG_INFO, "%s:%s:%s:%d", __func__, name, ch, i); in get_instance_id()
166 if (pos == i) in get_instance_id()
292 int i, j, n, k = 0; in scan_tzones() local
297 for (i = 0; i <= ptdata.max_tz_instance; i++) { in scan_tzones()
[all …]
/tools/perf/tests/
Ddso-data.c20 int fd, i; in test_file() local
38 for (i = 0; i < size; i++) in test_file()
39 buf[i] = (unsigned char) ((int) i % 10); in test_file()
107 size_t i; in test__dso_data() local
116 for (i = 0; i < ARRAY_SIZE(offsets); i++) { in test__dso_data()
117 struct test_data_offset *data = &offsets[i]; in test__dso_data()
147 for (i = 0; i < (size_t)size; i++) in test__dso_data()
149 buf[i] == (i % 10)); in test__dso_data()
189 int i; in dsos__create() local
194 for (i = 0; i < cnt; i++) { in dsos__create()
[all …]
Dhists_common.c83 size_t i; in setup_fake_machine() local
90 for (i = 0; i < ARRAY_SIZE(fake_threads); i++) { in setup_fake_machine()
93 thread = machine__findnew_thread(machine, fake_threads[i].pid, in setup_fake_machine()
94 fake_threads[i].pid); in setup_fake_machine()
98 thread__set_comm(thread, fake_threads[i].comm, 0); in setup_fake_machine()
101 for (i = 0; i < ARRAY_SIZE(fake_mmap_info); i++) { in setup_fake_machine()
105 .pid = fake_mmap_info[i].pid, in setup_fake_machine()
106 .tid = fake_mmap_info[i].pid, in setup_fake_machine()
107 .start = fake_mmap_info[i].start, in setup_fake_machine()
114 fake_mmap_info[i].filename); in setup_fake_machine()
[all …]
Dsample-parsing.c29 size_t i; in samples_same() local
71 for (i = 0; i < s1->read.group.nr; i++) in samples_same()
72 MCOMP(read.group.values[i]); in samples_same()
80 for (i = 0; i < s1->callchain->nr; i++) in samples_same()
81 COMP(callchain->ips[i]); in samples_same()
94 for (i = 0; i < s1->branch_stack->nr; i++) in samples_same()
95 MCOMP(branch_stack->entries[i]); in samples_same()
193 size_t i, sz, bufsz; in do_test() local
196 for (i = 0; i < sizeof(user_regs); i++) in do_test()
197 *(i + (u8 *)user_regs) = i & 0xfe; in do_test()
[all …]
Devsel-roundtrip-name.c10 int type, op, err = 0, ret = 0, i, idx; in perf_evsel__roundtrip_cache_name_test() local
23 for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) { in perf_evsel__roundtrip_cache_name_test()
24 __perf_evsel__hw_cache_type_op_res_name(type, op, i, in perf_evsel__roundtrip_cache_name_test()
42 for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) { in perf_evsel__roundtrip_cache_name_test()
43 __perf_evsel__hw_cache_type_op_res_name(type, op, i, in perf_evsel__roundtrip_cache_name_test()
66 int i, err; in __perf_evsel__name_array_test() local
73 for (i = 0; i < nr_names; ++i) { in __perf_evsel__name_array_test()
74 err = parse_events(evlist, names[i]); in __perf_evsel__name_array_test()
77 names[i], err); in __perf_evsel__name_array_test()
/tools/usb/ffs-aio-example/multibuff/device_app/
Daio_multibuff.c210 unsigned i; in init_bufs() local
216 for (i = 0; i < n; ++i) { in init_bufs()
217 iobuf->buf[i] = malloc(len*sizeof(**iobuf->buf)); in init_bufs()
218 iobuf->iocb[i] = malloc(sizeof(**iobuf->iocb)); in init_bufs()
225 unsigned i; in delete_bufs() local
226 for (i = 0; i < iobuf->cnt; ++i) { in delete_bufs()
227 free(iobuf->buf[i]); in delete_bufs()
228 free(iobuf->iocb[i]); in delete_bufs()
237 unsigned i, j; in main() local
299 for (i = 0; i < sizeof(iobuf)/sizeof(*iobuf); ++i) in main()
[all …]
/tools/power/cpupower/utils/helpers/
Dbitmask.c114 struct bitmask *bitmask_setbit(struct bitmask *bmp, unsigned int i) in bitmask_setbit() argument
116 _setbit(bmp, i, 1); in bitmask_setbit()
123 unsigned int i; in bitmask_setall() local
124 for (i = 0; i < bmp->size; i++) in bitmask_setall()
125 _setbit(bmp, i, 1); in bitmask_setall()
132 unsigned int i; in bitmask_clearall() local
133 for (i = 0; i < bmp->size; i++) in bitmask_clearall()
134 _setbit(bmp, i, 0); in bitmask_clearall()
141 unsigned int i; in bitmask_isallclear() local
142 for (i = 0; i < bmp->size; i++) in bitmask_isallclear()
[all …]
/tools/vm/
Dpage-types.c310 size_t i, j; in page_flag_name() local
312 for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) { in page_flag_name()
313 present = (flags >> i) & 1; in page_flag_name()
314 if (!page_flag_names[i]) { in page_flag_name()
316 fatal("unknown flag bit %d\n", i); in page_flag_name()
319 buf[j++] = present ? page_flag_names[i][0] : '_'; in page_flag_name()
328 size_t i, n; in page_flag_longname() local
330 for (i = 0, n = 0; i < ARRAY_SIZE(page_flag_names); i++) { in page_flag_longname()
331 if (!page_flag_names[i]) in page_flag_longname()
333 if ((flags >> i) & 1) in page_flag_longname()
[all …]
/tools/power/cpupower/lib/
Dsysfs.c276 unsigned int pos, i; in sysfs_get_freq_available_governors() local
285 for (i = 0; i < len; i++) { in sysfs_get_freq_available_governors()
286 if (linebuf[i] == ' ' || linebuf[i] == '\n') { in sysfs_get_freq_available_governors()
287 if (i - pos < 2) in sysfs_get_freq_available_governors()
303 current->governor = malloc(i - pos + 1); in sysfs_get_freq_available_governors()
307 memcpy(current->governor, linebuf + pos, i - pos); in sysfs_get_freq_available_governors()
308 current->governor[i - pos] = '\0'; in sysfs_get_freq_available_governors()
309 pos = i + 1; in sysfs_get_freq_available_governors()
333 unsigned int pos, i; in sysfs_get_available_frequencies() local
342 for (i = 0; i < len; i++) { in sysfs_get_available_frequencies()
[all …]

12345678910