Lines Matching +full:cpu +full:- +full:ns

39 	i = finish.tv_sec - start.tv_sec;  in timing()
41 i += finish.tv_nsec - start.tv_nsec; in timing()
43 ksft_print_msg("%lu.%09lu - %lu.%09lu = %llu (%.1fs)\n", in timing()
71 i = finish.tv_sec - start.tv_sec; in calibrate()
73 i += finish.tv_nsec - start.tv_nsec; in calibrate()
140 /* Pin to a single CPU so the benchmark won't bounce around the system. */
143 long cpu; in affinity() local
150 * choose the highest CPU instead of the lowest. in affinity()
152 for (cpu = ncores - 1; cpu >= 0; cpu--) { in affinity()
154 CPU_SET_S(cpu, setsz, setp); in affinity()
155 if (sched_setaffinity(getpid(), setsz, setp) == -1) in affinity()
157 printf("Pinned to CPU %lu of %lu\n", cpu + 1, ncores); in affinity()
160 fprintf(stderr, "Could not set CPU affinity -- calibration may not work well"); in affinity()
198 system("uname -a"); in main()
203 system("grep -H . /proc/sys/net/core/bpf_jit_enable"); in main()
205 system("grep -H . /proc/sys/net/core/bpf_jit_harden"); in main()
218 ksft_print_msg("getpid native: %llu ns\n", native); in main()
228 ksft_print_msg("getpid RET_ALLOW 1 filter (bitmap): %llu ns\n", bitmap1); in main()
235 ksft_print_msg("getpid RET_ALLOW 2 filters (bitmap): %llu ns\n", bitmap2); in main()
242 ksft_print_msg("getpid RET_ALLOW 3 filters (full): %llu ns\n", filter1); in main()
249 ksft_print_msg("getpid RET_ALLOW 4 filters (full): %llu ns\n", filter2); in main()
254 ksft_print_msg("Estimated " fmt ": %llu ns\n", var); \ in main()
262 bitmap1 - native); in main()
264 bitmap2 - native); in main()
266 filter1 - native); in main()
268 filter2 - native); in main()
270 bitmap1 - native - (bitmap2 - bitmap1)); in main()
271 ESTIMATE("seccomp per-filter overhead (last 2 diff)", per_filter1, in main()
272 filter2 - filter1); in main()
273 ESTIMATE("seccomp per-filter overhead (filters / 4)", per_filter2, in main()
274 (filter2 - native - entry) / 4); in main()
284 ret |= compare("per-filter (last 2 diff)", "≈", "per-filter (filters / 4)", in main()
288 bitmap1 - native, approx, bitmap2 - native, skip); in main()
295 bitmap1 - native, skip); in main()
297 bitmap2 - native, skip); in main()