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

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