Home
last modified time | relevance | path

Searched refs:res (Results 1 – 25 of 209) sorted by relevance

123456789

/tools/lib/
A Dhweight.c21 res = (res & 0x33333333) + ((res >> 2) & 0x33333333); in __sw_hweight32()
22 res = (res + (res >> 4)) & 0x0F0F0F0F; in __sw_hweight32()
23 res = res + (res >> 8); in __sw_hweight32()
31 res = (res & 0x3333) + ((res >> 2) & 0x3333); in __sw_hweight16()
32 res = (res + (res >> 4)) & 0x0F0F; in __sw_hweight16()
33 return (res + (res >> 8)) & 0x00FF; in __sw_hweight16()
39 res = (res & 0x33) + ((res >> 2) & 0x33); in __sw_hweight8()
40 return (res + (res >> 4)) & 0x0F; in __sw_hweight8()
57 res = (res + (res >> 4)) & 0x0F0F0F0F0F0F0F0Ful; in __sw_hweight64()
58 res = res + (res >> 8); in __sw_hweight64()
[all …]
/tools/testing/selftests/futex/functional/
A Dfutex_waitv.c40 int res; in waiterfn() local
49 if (res < 0) { in waiterfn()
103 if (res != 1) { in main()
105 res ? errno : res, in main()
136 if (res != 1) { in main()
138 res ? errno : res, in main()
159 res ? errno : res, in main()
178 res ? errno : res, in main()
196 res ? errno : res, in main()
212 res ? errno : res, in main()
[all …]
A Dfutex_requeue.c44 int res, ret = RET_PASS; in main() local
83 if (res != 1) { in main()
85 res ? errno : res, in main()
92 res = futex_wake(&f2, 1, 0); in main()
93 if (res != 1) { in main()
95 res ? errno : res, in main()
116 if (res != 10) { in main()
118 res ? errno : res, in main()
124 res = futex_wake(&f2, INT_MAX, 0); in main()
125 if (res != 7) { in main()
[all …]
A Dfutex_wait_timeout.c66 if (!res || errno != err) { in test_timeout()
68 res < 0 ? errno : res); in test_timeout()
99 int res, ret = RET_PASS; in main() local
143 res = futex_wait(&f1, f1, &to, 0); in main()
144 test_timeout(res, &ret, "futex_wait relative", ETIMEDOUT); in main()
155 res = futex_wait_bitset(&f1, f1, &to, 1, 0); in main()
167 res = futex_wait_requeue_pi(&f1, f1, &futex_pi, &to, 0); in main()
185 res = futex_lock_pi(&futex_pi, &to, 0, 0); in main()
195 res = futex_waitv(&waitv, 1, 0, &to, CLOCK_MONOTONIC); in main()
201 res = futex_waitv(&waitv, 1, 0, &to, CLOCK_REALTIME); in main()
[all …]
A Dfutex_wait_wouldblock.c44 int res, ret = RET_PASS; in main() local
76 res = futex_wait(&f1, f1+1, &to, FUTEX_PRIVATE_FLAG); in main()
77 if (!res || errno != EWOULDBLOCK) { in main()
79 res ? errno : res, in main()
80 res ? strerror(errno) : ""); in main()
99 res = futex_waitv(&waitv, 1, 0, &to, CLOCK_MONOTONIC); in main()
100 if (!res || errno != EWOULDBLOCK) { in main()
102 res ? errno : res, in main()
103 res ? strerror(errno) : ""); in main()
/tools/testing/selftests/bpf/progs/
A Dlocal_kptr_stash.c103 res = bpf_obj_new(typeof(*res)); in create_and_stash()
118 res = bpf_kptr_xchg(&mapval->node, res); in create_and_stash()
119 if (res) in create_and_stash()
141 res = bpf_obj_new(typeof(*res)); in stash_plain()
142 if (!res) in stash_plain()
146 res = bpf_kptr_xchg(&mapval->plain, res); in stash_plain()
147 if (res) in stash_plain()
164 res = bpf_obj_new(typeof(*res)); in stash_local_with_root()
165 if (!res) in stash_local_with_root()
179 res = bpf_kptr_xchg(&mapval->local_root, res); in stash_local_with_root()
[all …]
A Dlocal_kptr_stash_fail.c47 struct node_data2 *res; in stash_rb_nodes() local
54 res = bpf_obj_new(typeof(*res)); in stash_rb_nodes()
55 if (!res) in stash_rb_nodes()
57 res->key[0] = 40; in stash_rb_nodes()
59 res = bpf_kptr_xchg(&mapval->node, res); in stash_rb_nodes()
60 if (res) in stash_rb_nodes()
61 bpf_obj_drop(res); in stash_rb_nodes()
70 struct node_data *res; in drop_rb_node_off() local
77 res = bpf_obj_new(typeof(*res)); in drop_rb_node_off()
78 if (!res) in drop_rb_node_off()
[all …]
A Dtest_rdonly_maps.c23 } res = {}; variable
38 res.did_run = 1; in skip_loop()
39 res.iters = iters; in skip_loop()
40 res.sum = sum; in skip_loop()
57 res.did_run = 1; in part_loop()
58 res.iters = iters; in part_loop()
59 res.sum = sum; in part_loop()
78 res.did_run = 1; in full_loop()
79 res.iters = iters; in full_loop()
80 res.sum = sum; in full_loop()
A Drbtree.c95 struct bpf_rb_node *res = NULL; in rbtree_add_and_remove() local
114 if (!res) in rbtree_add_and_remove()
192 struct bpf_rb_node *res = NULL; in rbtree_first_and_remove() local
218 res = bpf_rbtree_first(&groot); in rbtree_first_and_remove()
219 if (!res) { in rbtree_first_and_remove()
230 if (!res) in rbtree_first_and_remove()
238 res = bpf_rbtree_first(&groot); in rbtree_first_and_remove()
239 if (!res) { in rbtree_first_and_remove()
279 if (!res) in rbtree_api_release_aliasing()
284 if (!res) in rbtree_api_release_aliasing()
[all …]
A Drbtree_fail.c112 struct bpf_rb_node *res; in rbtree_api_remove_no_drop() local
116 res = bpf_rbtree_first(&groot); in rbtree_api_remove_no_drop()
117 if (!res) in rbtree_api_remove_no_drop()
120 res = bpf_rbtree_remove(&groot, res); in rbtree_api_remove_no_drop()
122 if (res) { in rbtree_api_remove_no_drop()
159 struct bpf_rb_node *res; in rbtree_api_use_unchecked_remove_retval() local
163 res = bpf_rbtree_first(&groot); in rbtree_api_use_unchecked_remove_retval()
164 if (!res) in rbtree_api_use_unchecked_remove_retval()
166 res = bpf_rbtree_remove(&groot, res); in rbtree_api_use_unchecked_remove_retval()
209 struct bpf_rb_node *res; in rbtree_api_first_release_unlock_escape() local
[all …]
/tools/testing/nvdimm/test/
A Diomap.c60 return res; in get_nfit_res()
229 res = &req->res; in nfit_test_release_region()
235 WARN(!res || resource_size(res) != n, in nfit_test_release_region()
238 if (res) in nfit_test_release_region()
262 &nfit_res->res); in nfit_test_request_region()
269 res = &req->res; in nfit_test_request_region()
274 if (res) { in nfit_test_request_region()
283 res = &req->res; in nfit_test_request_region()
287 res->name = name; in nfit_test_request_region()
302 *d = res; in nfit_test_request_region()
[all …]
/tools/perf/util/
A Dthreads.c74 return res; in __threads_table_entry__get_last_match()
99 if (!res) { in threads__find()
101 res = thread__get(res); in threads__find()
104 if (res) in threads__find()
106 return res; in threads__find()
117 if (res) { in threads__findnew()
121 res = NULL; in threads__findnew()
123 res = thread__get(res); in threads__findnew()
125 res = thread__get(res); in threads__findnew()
128 if (res) in threads__findnew()
[all …]
A Dfncache.c37 static bool lookup_fncache(const char *name, bool *res) in lookup_fncache() argument
44 *res = (val != 0); in lookup_fncache()
48 static void update_fncache(const char *name, bool res) in update_fncache() argument
53 hashmap__set(fncache__get(), key, res, &old_key, /*old_value*/NULL); in update_fncache()
61 bool res; in file_available() local
63 if (lookup_fncache(name, &res)) in file_available()
64 return res; in file_available()
65 res = access(name, R_OK) == 0; in file_available()
66 update_fncache(name, res); in file_available()
67 return res; in file_available()
/tools/testing/selftests/bpf/
A Dbench.h58 void (*measure)(struct bench_res* res);
59 void (*report_progress)(int iter, struct bench_res* res, long delta_ns);
60 void (*report_final)(struct bench_res res[], int res_cnt);
72 void hits_drops_report_final(struct bench_res res[], int res_cnt);
74 void false_hits_report_final(struct bench_res res[], int res_cnt);
75 void ops_report_progress(int iter, struct bench_res *res, long delta_ns);
76 void ops_report_final(struct bench_res res[], int res_cnt);
77 void local_storage_report_progress(int iter, struct bench_res *res,
79 void local_storage_report_final(struct bench_res res[], int res_cnt);
80 void grace_period_latency_basic_stats(struct bench_res res[], int res_cnt,
[all …]
A Dbench.c41 long total = res->false_hits + res->hits + res->drops; in false_hits_report_progress()
47 res->false_hits, total, ((float)res->false_hits / total) * 100); in false_hits_report_progress()
56 total_hits += res[i].hits; in false_hits_report_final()
57 total_false_hits += res[i].false_hits; in false_hits_report_final()
58 total_drops += res[i].drops; in false_hits_report_final()
92 gp_stat->mean += res[i].gp_ns / 1000.0 / (double)res[i].gp_ct / (0.0 + res_cnt); in grace_period_latency_basic_stats()
94 #define IT_MEAN_DIFF (res[i].gp_ns / 1000.0 / (double)res[i].gp_ct - gp_stat->mean) in grace_period_latency_basic_stats()
110 gp_stat->mean += res[i].stime / (double)res[i].gp_ct / (0.0 + res_cnt); in grace_period_ticks_basic_stats()
112 #define IT_MEAN_DIFF (res[i].stime / (double)res[i].gp_ct - gp_stat->mean) in grace_period_ticks_basic_stats()
142 total_ops = res[i].hits + res[i].drops; in hits_drops_report_final()
[all …]
/tools/testing/selftests/prctl/
A Dset-process-name.c19 int res; in set_name() local
21 res = prctl(PR_SET_NAME, name, NULL, NULL, NULL); in set_name()
23 if (res < 0) in set_name()
25 return res; in set_name()
31 int res; in check_is_name_correct() local
33 res = prctl(PR_GET_NAME, name, NULL, NULL, NULL); in check_is_name_correct()
35 if (res < 0) in check_is_name_correct()
44 int res; in check_null_pointer() local
46 res = prctl(PR_GET_NAME, name, NULL, NULL, NULL); in check_null_pointer()
48 return res; in check_null_pointer()
[all …]
/tools/bpf/bpftool/
A Dfeature.c93 int res; in print_kernel_option() local
175 long res; in read_procfs() local
189 res = -1; in read_procfs()
197 long res; in probe_unprivileged_disabled() local
226 long res; in probe_jit_enable() local
256 long res; in probe_jit_harden() local
286 long res; in probe_jit_kallsyms() local
312 long res; in probe_jit_limit() local
499 bool res; in probe_bpf_syscall() local
553 bool res; in probe_prog_type() local
[all …]
A Dstruct_ops.c24 struct res { struct
172 if (res->nr_errs || (!res->nr_maps && must_have_one_map)) in cmd_retval()
190 struct res res = {}; in do_search() local
197 return res; in do_search()
215 if (!wtr && name && !res.nr_errs && !res.nr_maps) in do_search()
232 return res; in do_search()
239 struct res res = {}; in do_one_id() local
301 return res; in do_one_id()
340 struct res res; in do_show() local
411 struct res res; in do_dump() local
[all …]
/tools/testing/selftests/tc-testing/
A Dtdc.py277 return res
286 return res
293 return res
294 res = find_in_json(res, outputJSON, matchJSON, 0)
296 return res
306 res = find_in_json_dict(res, outputJSONVal, matchJSONVal)
314 return res
334 return res
362 return res
373 return res
[all …]
/tools/testing/selftests/bpf/prog_tests/
A Dverifier_log.c55 int i, mode, err, prog_fd, res; in verif_log_subtest() local
277 int i, res; in verif_btf_log_subtest() local
317 res = load_btf(&opts, true); in verif_btf_log_subtest()
338 res = load_btf(&opts, true); in verif_btf_log_subtest()
366 res = load_btf(&opts, bad_btf); in verif_btf_log_subtest()
377 res = load_btf(&opts, bad_btf); in verif_btf_log_subtest()
386 res = load_btf(&opts, bad_btf); in verif_btf_log_subtest()
397 res = load_btf(&opts, bad_btf); in verif_btf_log_subtest()
406 res = load_btf(&opts, true); in verif_btf_log_subtest()
414 res = load_btf(&opts, bad_btf); in verif_btf_log_subtest()
[all …]
/tools/testing/selftests/ptp/
A Dphc.sh92 local res
94 res=$(phc_ctl $DEV set 0 wait 120.5 get 2> /dev/null \
98 (( res == 120 ))
103 local res
105 res=$(phc_ctl $DEV set 0 adj 10 get 2> /dev/null \
109 (( res == 10 ))
114 local res
117 res=$(phc_ctl $DEV freq 10000000 set 0 wait 100.5 get 2> /dev/null \
121 (( res == 101 ))
/tools/virtio/ringtest/
A Dmain.h155 void __read_once_size(const volatile void *p, void *res, int size) in __read_once_size() argument
158 case 1: *(unsigned char *)res = *(volatile unsigned char *)p; break; in __read_once_size()
159 case 2: *(unsigned short *)res = *(volatile unsigned short *)p; break; in __read_once_size()
160 case 4: *(unsigned int *)res = *(volatile unsigned int *)p; break; in __read_once_size()
161 case 8: *(unsigned long long *)res = *(volatile unsigned long long *)p; break; in __read_once_size()
164 __builtin_memcpy((void *)res, (const void *)p, size); in __read_once_size()
172 case 1: *(volatile unsigned char *)p = *(unsigned char *)res; break; in __write_once_size()
173 case 2: *(volatile unsigned short *)p = *(unsigned short *)res; break; in __write_once_size()
174 case 4: *(volatile unsigned int *)p = *(unsigned int *)res; break; in __write_once_size()
175 case 8: *(volatile unsigned long long *)p = *(unsigned long long *)res; break; in __write_once_size()
[all …]
/tools/perf/tests/shell/
A Dstat+shadow_stat.sh38 res=`echo $num $cyc | awk '{printf "%.2f", $1 / $2}'`
39 if [ "$ipc" != "$res" ]; then
41 diff=`echo $ipc $res $THRESHOLD | \
45 echo "IPC is different: $res != $ipc ($num / $cyc)"
80 res=`echo $num $cyc | awk '{printf "%.2f", $1 / $2}'`
81 if [ "$ipc" != "$res" ]; then
83 diff=`echo $ipc $res $THRESHOLD | \
87 echo "IPC is different: $res != $ipc ($num / $cyc)"
/tools/testing/selftests/tc-testing/plugin-lib/
A DvalgrindPlugin.py45 res.set_result(ResultState.skip)
47 self._add_results(res)
109 res.set_result(ResultState.skip)
111 self._add_results(res)
148 res.set_result(ResultState.fail)
149 res.set_failmsg('Memory leak detected')
150 res.append_failmsg(content)
152 res.set_result(ResultState.success)
154 self._add_results(res)
157 def _add_results(self, res): argument
[all …]
/tools/include/linux/
A Dcompiler.h174 case 1: *(__u8_alias_t *) res = *(volatile __u8_alias_t *) p; break; in __read_once_size()
175 case 2: *(__u16_alias_t *) res = *(volatile __u16_alias_t *) p; break; in __read_once_size()
176 case 4: *(__u32_alias_t *) res = *(volatile __u32_alias_t *) p; break; in __read_once_size()
177 case 8: *(__u64_alias_t *) res = *(volatile __u64_alias_t *) p; break; in __read_once_size()
180 __builtin_memcpy((void *)res, (const void *)p, size); in __read_once_size()
185 static __always_inline void __write_once_size(volatile void *p, void *res, int size) in __write_once_size() argument
188 case 1: *(volatile __u8_alias_t *) p = *(__u8_alias_t *) res; break; in __write_once_size()
189 case 2: *(volatile __u16_alias_t *) p = *(__u16_alias_t *) res; break; in __write_once_size()
190 case 4: *(volatile __u32_alias_t *) p = *(__u32_alias_t *) res; break; in __write_once_size()
191 case 8: *(volatile __u64_alias_t *) p = *(__u64_alias_t *) res; break; in __write_once_size()
[all …]

Completed in 40 milliseconds

123456789