Home
last modified time | relevance | path

Searched refs:tv_nsec (Results 1 – 25 of 77) sorted by relevance

1234

/tools/testing/selftests/bpf/progs/
Dtest_vmlinux.c22 long tv_nsec; in handle__tp() local
28 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in handle__tp()
29 tv_nsec != MY_TV_NSEC) in handle__tp()
40 long tv_nsec; in BPF_PROG() local
46 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in BPF_PROG()
47 tv_nsec != MY_TV_NSEC) in BPF_PROG()
58 long tv_nsec; in BPF_PROG() local
64 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in BPF_PROG()
65 tv_nsec != MY_TV_NSEC) in BPF_PROG()
/tools/testing/selftests/mqueue/
Dmq_perf_tests.c359 (middle.tv_nsec - start.tv_nsec); \
360 send_total.tv_nsec += nsec; \
361 if (send_total.tv_nsec >= 1000000000) { \
363 send_total.tv_nsec -= 1000000000; \
366 (end.tv_nsec - middle.tv_nsec); \
367 recv_total.tv_nsec += nsec; \
368 if (recv_total.tv_nsec >= 1000000000) { \
370 recv_total.tv_nsec -= 1000000000; \
449 printf("\t\tClock resolution:\t\t%lu nsec%s\n", res.tv_nsec, in perf_test_thread()
450 res.tv_nsec > 1 ? "s" : ""); in perf_test_thread()
[all …]
/tools/testing/radix-tree/
Dbenchmark.c39 (finish.tv_nsec - start.tv_nsec); in benchmark_iter()
67 (finish.tv_nsec - start.tv_nsec); in benchmark_insert()
88 (finish.tv_nsec - start.tv_nsec); in benchmark_tagging()
109 (finish.tv_nsec - start.tv_nsec); in benchmark_delete()
/tools/testing/selftests/timers/
Dnanosleep.c86 if (a.tv_nsec > b.tv_nsec) in in_order()
93 ts.tv_nsec += ns; in timespec_add()
94 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
95 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
120 rel.tv_nsec = 0; in nanosleep_test()
Dmqueue-lat.c42 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
44 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
50 ts.tv_nsec += ns; in timespec_add()
51 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
52 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
Dnsleep-lat.c81 ts.tv_nsec += ns; in timespec_add()
82 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
83 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
92 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
94 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
105 target.tv_nsec = ns%NSEC_PER_SEC; in nanosleep_lat_test()
Dleap-a-day.c66 if (a.tv_nsec > b.tv_nsec) in in_order()
73 ts.tv_nsec += ns; in timespec_add()
74 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
75 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
301 its1.it_value.tv_nsec = 0; in main()
303 its1.it_interval.tv_nsec = 0; in main()
308 ts.tv_nsec = 0; in main()
341 tai.tv_nsec, in main()
356 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
Dalarmtimer-suspend.c89 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
91 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
109 ts.tv_nsec, delta_ns); in sigalarm()
152 start_time.tv_sec, start_time.tv_nsec); in main()
157 its1.it_interval.tv_nsec = 0; in main()
Dinconsistency-check.c87 if (a.tv_nsec > b.tv_nsec) in in_order()
130 list[i].tv_nsec); in consistency_test()
135 delta += list[inconsistent].tv_nsec; in consistency_test()
137 delta -= list[inconsistent+1].tv_nsec; in consistency_test()
Dthreadtest.c53 (b->tv_nsec < a->tv_nsec)) { in checklist()
66 printf("%lu:%lu\n", list[j].tv_sec, list[j].tv_nsec); in checklist()
Dset-timer-lat.c90 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
92 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
159 its1.it_value.tv_nsec = 0; in setup_timer()
162 its1.it_interval.tv_nsec = 0; in setup_timer()
Dfreq-step.c45 return ts1->tv_sec - ts2->tv_sec + (ts1->tv_nsec - ts2->tv_nsec) / 1e9; in diff_timespec()
72 sample->time = ts1.tv_sec + ts1.tv_nsec / 1e9; in get_sample()
233 srand(ts.tv_sec ^ ts.tv_nsec); in init_test()
/tools/testing/selftests/timens/
Dfutex.c30 timeout.tv_nsec += NSEC_PER_SEC / 10; // 100ms in run_test()
31 if (timeout.tv_nsec > NSEC_PER_SEC) { in run_test()
33 timeout.tv_nsec -= NSEC_PER_SEC; in run_test()
51 (end.tv_sec == timeout.tv_sec && end.tv_nsec < timeout.tv_nsec)) { in run_test()
Dtimer.c33 new_value.it_value.tv_nsec = 0; in run_test()
35 new_value.it_interval.tv_nsec = 0; in run_test()
39 new_value.it_value.tv_nsec += now.tv_nsec; in run_test()
Dtimerfd.c41 new_value.it_value.tv_nsec = 0; in run_test()
43 new_value.it_interval.tv_nsec = 0; in run_test()
47 new_value.it_value.tv_nsec += now.tv_nsec; in run_test()
Dgettime_perf.c49 start.tv_nsec > tp.tv_nsec); i++) { in test()
/tools/testing/selftests/kvm/
Ddirty_log_perf_test.c72 ts_diff.tv_nsec); in vcpu_worker()
76 ts_diff.tv_nsec); in vcpu_worker()
86 total.tv_sec, total.tv_nsec, avg.tv_sec, avg.tv_nsec); in vcpu_worker()
154 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test()
162 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test()
182 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test()
191 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test()
202 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test()
216 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test()
221 get_dirty_log_total.tv_nsec, avg.tv_sec, avg.tv_nsec); in run_test()
[all …]
/tools/testing/selftests/kvm/lib/
Dtest_util.c59 return (int64_t)ts.tv_nsec + 1000000000LL * (int64_t)ts.tv_sec; in timespec_to_ns()
66 res.tv_nsec = ts.tv_nsec + ns; in timespec_add_ns()
67 res.tv_sec = ts.tv_sec + res.tv_nsec / 1000000000LL; in timespec_add_ns()
68 res.tv_nsec %= 1000000000LL; in timespec_add_ns()
/tools/testing/selftests/powerpc/benchmarks/
Dfutex_bench.c34 …printf("time = %.6f\n", ts_end.tv_sec - ts_start.tv_sec + (ts_end.tv_nsec - ts_start.tv_nsec) / 1e… in test_futex()
Dmmap_bench.c55 …printf("time = %.6f\n", ts_end.tv_sec - ts_start.tv_sec + (ts_end.tv_nsec - ts_start.tv_nsec) / 1e… in test_mmap()
Dnull_syscall.c146 (tv_now.tv_nsec - tv_start.tv_nsec); in main()
/tools/power/cpupower/utils/idle_monitor/
Dcpupower-monitor.c56 if ((end.tv_nsec - start.tv_nsec) < 0) { in timespec_diff_us()
58 temp.tv_nsec = 1000000000 + end.tv_nsec - start.tv_nsec; in timespec_diff_us()
61 temp.tv_nsec = end.tv_nsec - start.tv_nsec; in timespec_diff_us()
63 return (temp.tv_sec * 1000000) + (temp.tv_nsec / 1000); in timespec_diff_us()
/tools/testing/selftests/seccomp/
Dseccomp_benchmark.c39 i += finish.tv_nsec - start.tv_nsec; in timing()
42 finish.tv_sec, finish.tv_nsec, in timing()
43 start.tv_sec, start.tv_nsec, in timing()
71 i += finish.tv_nsec - start.tv_nsec; in calibrate()
/tools/testing/selftests/x86/
Dtest_vdso.c191 return a->tv_nsec <= b->tv_nsec; in ts_leq()
250 (unsigned long long)start.tv_sec, start.tv_nsec, in test_one_clock_gettime()
251 (unsigned long long)vdso.tv_sec, vdso.tv_nsec, in test_one_clock_gettime()
252 (unsigned long long)end.tv_sec, end.tv_nsec); in test_one_clock_gettime()
/tools/testing/selftests/intel_pstate/
Daperf.c86 start = before.tv_sec*MSEC_PER_SEC + before.tv_nsec/NSEC_PER_MSEC; in main()
87 finish = after.tv_sec*MSEC_PER_SEC + after.tv_nsec/NSEC_PER_MSEC; in main()

1234