Home
last modified time | relevance | path

Searched refs:ts (Results 1 – 25 of 72) sorted by relevance

123

/tools/perf/util/
Dthread-stack.c118 static int thread_stack__grow(struct thread_stack *ts) in thread_stack__grow() argument
123 new_sz = ts->sz + STACK_GROWTH; in thread_stack__grow()
126 new_stack = realloc(ts->stack, sz); in thread_stack__grow()
130 ts->stack = new_stack; in thread_stack__grow()
131 ts->sz = new_sz; in thread_stack__grow()
136 static int thread_stack__init(struct thread_stack *ts, struct thread *thread, in thread_stack__init() argument
143 err = thread_stack__grow(ts); in thread_stack__init()
152 ts->br_stack_rb = zalloc(sz); in thread_stack__init()
153 if (!ts->br_stack_rb) in thread_stack__init()
155 ts->br_stack_sz = br_stack_sz; in thread_stack__init()
[all …]
Dtime-utils.h45 struct timespec ts; in rdclock() local
47 clock_gettime(CLOCK_MONOTONIC, &ts); in rdclock()
48 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in rdclock()
Ds390-cpumsf.c315 unsigned long long ts; in trailer_timestamp() local
317 memcpy(&ts, &te->timestamp[idx], sizeof(ts)); in trailer_timestamp()
318 return be64toh(ts); in trailer_timestamp()
599 static int s390_cpumsf_samples(struct s390_cpumsf_queue *sfq, u64 *ts) in s390_cpumsf_samples() argument
612 *ts = ~0ULL; in s390_cpumsf_samples()
628 if (aux_ts > *ts) { in s390_cpumsf_samples()
629 *ts = aux_ts; in s390_cpumsf_samples()
657 if (aux_ts > *ts) { in s390_cpumsf_samples()
658 *ts = aux_ts; in s390_cpumsf_samples()
666 *ts = aux_ts; in s390_cpumsf_samples()
[all …]
/tools/testing/selftests/bpf/progs/
Dtest_vmlinux.c21 struct __kernel_timespec *ts; in handle__tp() local
27 ts = (void *)args->args[0]; in handle__tp()
28 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in handle__tp()
39 struct __kernel_timespec *ts; in BPF_PROG() local
45 ts = (void *)PT_REGS_PARM1_CORE(regs); in BPF_PROG()
46 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in BPF_PROG()
57 struct __kernel_timespec *ts; in BPF_PROG() local
63 ts = (void *)PT_REGS_PARM1_CORE(regs); in BPF_PROG()
64 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in BPF_PROG()
Dnetcnt_prog.c31 __u64 ts, dt; in bpf_nextcnt() local
50 ts = bpf_ktime_get_ns(); in bpf_nextcnt()
51 dt = ts - percpu_cnt->prev_ts; in bpf_nextcnt()
62 percpu_cnt->prev_ts = ts; in bpf_nextcnt()
/tools/virtio/virtio-trace/
Dtrace-agent-rw.c108 struct rw_thread_info *ts = (struct rw_thread_info *)thread_info; in rw_thread_main() local
110 bind_cpu(ts->cpu_num); in rw_thread_main()
127 rlen = splice(ts->in_fd, NULL, ts->read_pipe, NULL, in rw_thread_main()
128 ts->pipe_size, SPLICE_F_MOVE | SPLICE_F_MORE); in rw_thread_main()
131 pr_err("Splice_read in rw-thread(%d)\n", ts->cpu_num); in rw_thread_main()
141 pr_debug("Read retry(cpu:%d)\n", ts->cpu_num); in rw_thread_main()
148 ret = splice(ts->write_pipe, NULL, ts->out_fd, NULL, in rw_thread_main()
154 ts->cpu_num); in rw_thread_main()
/tools/testing/selftests/kvm/lib/
Dtest_util.c57 int64_t timespec_to_ns(struct timespec ts) in timespec_to_ns() argument
59 return (int64_t)ts.tv_nsec + 1000000000LL * (int64_t)ts.tv_sec; in timespec_to_ns()
62 struct timespec timespec_add_ns(struct timespec ts, int64_t ns) in timespec_add_ns() argument
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()
95 struct timespec timespec_div(struct timespec ts, int divisor) in timespec_div() argument
97 int64_t ns = timespec_to_ns(ts) / divisor; in timespec_div()
/tools/testing/selftests/timers/
Dleap-a-day.c71 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
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()
76 ts.tv_sec++; in timespec_add()
78 return ts; in timespec_add()
213 struct timespec ts; in main() local
215 if (clock_gettime(CLOCK_TAI, &ts)) { in main()
238 struct timespec ts; in main() local
243 clock_gettime(CLOCK_REALTIME, &ts); in main()
[all …]
Dmqueue-lat.c48 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
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()
53 ts.tv_sec++; in timespec_add()
55 return ts; in timespec_add()
Dnanosleep.c91 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
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()
96 ts.tv_sec++; in timespec_add()
98 return ts; in timespec_add()
Draw_skew.c46 unsigned long long ts_to_nsec(struct timespec ts) in ts_to_nsec() argument
48 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
53 struct timespec ts; in nsec_to_ts() local
55 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
56 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
57 return ts; in nsec_to_ts()
Dnsleep-lat.c79 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
81 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()
84 ts.tv_sec++; in timespec_add()
86 return ts; in timespec_add()
Dadjtick.c44 unsigned long long ts_to_nsec(struct timespec ts) in ts_to_nsec() argument
46 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
51 struct timespec ts; in nsec_to_ts() local
53 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
54 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
56 return ts; in nsec_to_ts()
Dalarmtimer-suspend.c100 struct timespec ts; in sigalarm() local
102 clock_gettime(alarm_clock_id, &ts); in sigalarm()
105 delta_ns = timespec_sub(start_time, ts); in sigalarm()
108 printf("ALARM(%i): %ld:%ld latency: %lld ns ", alarmcount, ts.tv_sec, in sigalarm()
109 ts.tv_nsec, delta_ns); in sigalarm()
Dleapcrash.c61 struct timespec ts; in main() local
75 clock_gettime(CLOCK_REALTIME, &ts); in main()
78 next_leap = ts.tv_sec; in main()
Dfreq-step.c205 struct timespec ts; in init_test() local
208 if (clock_gettime(CLOCK_MONOTONIC_RAW, &ts)) { in init_test()
213 mono_raw_base = ts.tv_sec; in init_test()
215 if (clock_gettime(CLOCK_MONOTONIC, &ts)) { in init_test()
220 mono_base = ts.tv_sec; in init_test()
233 srand(ts.tv_sec ^ ts.tv_nsec); in init_test()
/tools/leds/
Duledmon.c27 struct timespec ts; in main() local
57 clock_gettime(CLOCK_MONOTONIC, &ts); in main()
58 printf("[%ld.%09ld] %u\n", ts.tv_sec, ts.tv_nsec, brightness); in main()
Dled_hw_brightness_mon.c31 struct timespec ts; in main() local
67 clock_gettime(CLOCK_MONOTONIC, &ts); in main()
79 printf("[%ld.%09ld] %d\n", ts.tv_sec, ts.tv_nsec, atoi(buf)); in main()
/tools/testing/selftests/ptp/
Dtestptp.c155 struct timespec ts; in main() local
321 if (clock_gettime(clkid, &ts)) { in main()
325 ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); in main()
330 clock_gettime(CLOCK_REALTIME, &ts); in main()
331 if (clock_settime(clkid, &ts)) { in main()
339 clock_gettime(clkid, &ts); in main()
340 if (clock_settime(CLOCK_REALTIME, &ts)) { in main()
348 ts.tv_sec = seconds; in main()
349 ts.tv_nsec = 0; in main()
350 if (clock_settime(clkid, &ts)) { in main()
[all …]
/tools/perf/scripts/python/
Dsched-migration.py232 def get_time_slice(self, ts): argument
234 slice = TimeSlice(ts, TimeSlice(-1, None))
236 slice = self.data[-1].next(ts)
239 def find_time_slice(self, ts): argument
249 if self.data[i].start <= ts and self.data[i].end >= ts:
254 if self.data[i].end < ts:
257 elif self.data[i].start > ts:
270 ts = self[idx]
271 rq = ts.rqs[cpu]
274 raw += "Timestamp : %d.%06d\n" % (ts.start / (10 ** 9), (ts.start % (10 ** 9)) / 1000)
[all …]
/tools/testing/selftests/net/
Dso_txtime.c56 struct timespec ts; in gettime_ns() local
58 if (clock_gettime(cfg_clockid, &ts)) in gettime_ns()
61 return ts.tv_sec * (1000ULL * 1000 * 1000) + ts.tv_nsec; in gettime_ns()
64 static void do_send_one(int fdt, struct timed_send *ts) in do_send_one() argument
73 iov.iov_base = &ts->data; in do_send_one()
79 if (ts->delay_us >= 0) { in do_send_one()
84 tdeliver = glob_tstart + ts->delay_us * 1000; in do_send_one()
101 static bool do_recv_one(int fdr, struct timed_send *ts) in do_recv_one() argument
116 texpect = ts->delay_us >= 0 ? ts->delay_us : 0; in do_recv_one()
121 if (rbuf[0] != ts->data) in do_recv_one()
[all …]
/tools/lib/traceevent/
Dkbuffer.h34 void *kbuffer_read_event(struct kbuffer *kbuf, unsigned long long *ts);
35 void *kbuffer_next_event(struct kbuffer *kbuf, unsigned long long *ts);
42 void *kbuffer_read_at_offset(struct kbuffer *kbuf, int offset, unsigned long long *ts);
/tools/thermal/tmon/
Dpid.c60 p_param.ts = ticktime; in init_thermal_controller()
102 i_term = p_param.kp * p_param.ki * p_param.ts * ek; in controller_handler()
103 d_term = -p_param.kp * p_param.kd * (xk - 2 * xk_1 + xk_2) / p_param.ts; in controller_handler()
/tools/testing/selftests/futex/functional/
Dfutex_requeue_pi.c284 struct timespec ts, *tsp = NULL; in unit_test() local
293 ret = clock_gettime(CLOCK_MONOTONIC, &ts); in unit_test()
294 secs = (ts.tv_nsec + timeout_ns) / 1000000000; in unit_test()
295 ts.tv_nsec = ((int64_t)ts.tv_nsec + timeout_ns) % 1000000000; in unit_test()
296 ts.tv_sec += secs; in unit_test()
297 info("ts.tv_sec = %ld\n", ts.tv_sec); in unit_test()
298 info("ts.tv_nsec = %ld\n", ts.tv_nsec); in unit_test()
299 tsp = &ts; in unit_test()
/tools/testing/selftests/kvm/include/
Dtest_util.h63 int64_t timespec_to_ns(struct timespec ts);
64 struct timespec timespec_add_ns(struct timespec ts, int64_t ns);
68 struct timespec timespec_div(struct timespec ts, int divisor);

123