Lines Matching +full:n +full:- +full:factor
1 // SPDX-License-Identifier: GPL-2.0-only
37 * requires some per-architecture support (i.e. knowledge about the
39 * a small trampoline is open-coded for x86_64. Other architectures
65 int factor; variable
77 return (t2.tv_sec - t1.tv_sec) + 1.0e-9 * (t2.tv_nsec - t1.tv_nsec); in one_sysinfo_step()
84 printf("Calibrating test set to last ~%d seconds...\n", CALIBRATE_TO_SECS); in calibrate_set()
88 factor += CALIBRATE_TO_SECS; in calibrate_set()
91 printf("test iterations = %d\n", CALIBRATION_STEP * factor); in calibrate_set()
99 for (i = 0; i < factor; ++i) in perf_syscall()
100 partial += one_sysinfo_step()/(CALIBRATION_STEP*factor); in perf_syscall()
111 /* printf and friends are not signal-safe. */ in handle_sigsys()
112 len = snprintf(buf, 1024, "Caught sys_%x\n", info->si_syscall); in handle_sigsys()
115 if (info->si_syscall == MAGIC_SYSCALL_1) in handle_sigsys()
153 printf("Avg syscall time %.0lfns.\n", time1 * 1.0e9); in main()
158 exit(-1); in main()
161 fprintf(stderr, "Enabling syscall trapping.\n"); in main()
165 (syscall_dispatcher_end - syscall_dispatcher_start + 1), in main()
167 perror("prctl failed\n"); in main()
168 exit(-1); in main()
176 fprintf(stderr, "Failed to return with selector blocked.\n"); in main()
177 exit(-1); in main()
184 fprintf(stderr, "syscall trapping does not work.\n"); in main()
185 exit(-1); in main()
191 perror("syscall trapping intercepted more syscalls than expected\n"); in main()
192 exit(-1); in main()
195 printf("trapped_call_count %lu, native_call_count %lu.\n", in main()
197 printf("Avg syscall time %.0lfns.\n", time2 * 1.0e9); in main()
198 printf("Interception overhead: %.1lf%% (+%.0lfns).\n", in main()
199 100.0 * (time2 / time1 - 1.0), 1.0e9 * (time2 - time1)); in main()