Home
last modified time | relevance | path

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

12345

/tools/perf/util/
A Dthread-stack.c243 if (ts->cnt == ts->sz) { in thread_stack__push()
389 ts->br_stack_pos = ts->br_stack_sz; in thread_stack__update_br_stack()
499 memset(ts, 0, sizeof(*ts)); in thread_stack__reset()
546 ip = ts->stack[ts->cnt - j].ret_addr; in thread_stack__sample()
792 if (ts->cnt == ts->sz) { in thread_stack__push_cp()
798 tse = &ts->stack[ts->cnt++]; in thread_stack__push_cp()
940 parent = ts->stack[ts->cnt - 1].cp; in thread_stack__no_call_return()
1008 tse = &ts->stack[ts->cnt - 1]; in thread_stack__trace_begin()
1027 if (!ts->cnt || (ts->cnt == 1 && ts->stack[0].ref == ref)) in thread_stack__trace_end()
1096 ts->stack[ts->cnt - 1].cp = cp; in thread_stack__x86_retpoline()
[all …]
A 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()
A Ds390-cpumsf.c318 memcpy(&ts, &te->timestamp[idx], sizeof(ts)); in trailer_timestamp()
319 return be64toh(ts); in trailer_timestamp()
615 *ts = ~0ULL; in s390_cpumsf_samples()
632 *ts = aux_ts; in s390_cpumsf_samples()
661 *ts = aux_ts; in s390_cpumsf_samples()
669 *ts = aux_ts; in s390_cpumsf_samples()
696 u64 *ts) in s390_cpumsf_run_decoder() argument
715 *ts = ~0ULL; in s390_cpumsf_run_decoder()
829 i, ts); in s390_cpumsf_setup_queues()
848 u64 ts; in s390_cpumsf_process_queues() local
[all …]
A Dbpf_kwork_top.c64 struct timespec ts; in perf_kwork__top_start() local
66 clock_gettime(CLOCK_MONOTONIC, &ts); in perf_kwork__top_start()
67 skel->bss->from_timestamp = (u64)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in perf_kwork__top_start()
74 struct timespec ts; in perf_kwork__top_finish() local
77 clock_gettime(CLOCK_MONOTONIC, &ts); in perf_kwork__top_finish()
78 skel->bss->to_timestamp = (u64)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in perf_kwork__top_finish()
/tools/testing/selftests/bpf/progs/
A 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_SYSCALL(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_SYSCALL(regs); in BPF_PROG()
64 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in BPF_PROG()
A Dnetcnt_prog.c30 __u64 ts, dt; in bpf_nextcnt() local
49 ts = bpf_ktime_get_ns(); in bpf_nextcnt()
50 dt = ts - percpu_cnt->prev_ts; in bpf_nextcnt()
61 percpu_cnt->prev_ts = ts; in bpf_nextcnt()
/tools/testing/selftests/net/
A Dcmsg_time.sh68 ts=$(ip netns exec $NS ./cmsg_sender -p $p $i 1234)
69 check_result $? "$ts" "" "$prot - no options"
71 ts=$(ip netns exec $NS ./cmsg_sender -p $p $i 1234 -t | wc -l)
72 check_result $? "$ts" "2" "$prot - ts cnt"
73 ts=$(ip netns exec $NS ./cmsg_sender -p $p $i 1234 -t |
75 check_result $? "$ts" "OK" "$prot - ts0 SCHED"
76 ts=$(ip netns exec $NS ./cmsg_sender -p $p $i 1234 -t |
78 check_result $? "$ts" "OK" "$prot - ts0 SND"
80 ts=$(ip netns exec $NS ./cmsg_sender -p $p $i 1234 -t -d 1000 |
82 check_result $? "$ts" "OK" "$prot - TXTIME abs"
[all …]
A Dcmsg_sender.c71 } ts; member
175 opt.ts.ena = true; in cs_parse_args()
302 if (opt.ts.ena) { in cs_write_cmsg()
354 if (!opt.ts.ena) in cs_read_cmsg()
360 ts = NULL; in cs_read_cmsg()
391 if (!ts) in cs_read_cmsg()
399 if (!ts->ts[i].tv_sec && !ts->ts[i].tv_nsec) in cs_read_cmsg()
402 rel_time = (ts->ts[i].tv_sec - time_start_real.tv_sec) * in cs_read_cmsg()
404 (ts->ts[i].tv_nsec - time_start_real.tv_nsec) / in cs_read_cmsg()
460 if (opt.ts.ena) { in ca_set_sockopts()
[all …]
/tools/testing/selftests/vDSO/
A Dvdso_test_abi.c30 typedef long (*vdso_clock_gettime_t)(clockid_t clk_id, struct timespec *ts);
31 typedef long (*vdso_clock_getres_t)(clockid_t clk_id, struct timespec *ts);
86 struct timespec ts; in vdso_test_clock_gettime() local
87 long ret = VDSO_CALL(vdso_clock_gettime, 2, clk_id, &ts); in vdso_test_clock_gettime()
91 (long long)ts.tv_sec, (long long)ts.tv_nsec); in vdso_test_clock_gettime()
138 struct timespec ts, sys_ts; in vdso_test_clock_getres() local
139 long ret = VDSO_CALL(vdso_clock_getres, 2, clk_id, &ts); in vdso_test_clock_getres()
143 (long long)ts.tv_sec, (long long)ts.tv_nsec); in vdso_test_clock_getres()
153 if ((sys_ts.tv_sec != ts.tv_sec) || (sys_ts.tv_nsec != ts.tv_nsec)) in vdso_test_clock_getres()
/tools/virtio/virtio-trace/
A 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/timers/
A Dleap-a-day.c73 ts.tv_nsec += ns; 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
238 struct timespec ts; in main() local
246 next_leap = ts.tv_sec; in main()
307 ts.tv_sec = next_leap - 3; in main()
308 ts.tv_nsec = 0; in main()
355 ts.tv_sec = 0; in main()
[all …]
A 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()
A Dnanosleep.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()
A Draw_skew.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()
55 return ts; in nsec_to_ts()
A Dnsleep-lat.c66 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
68 ts.tv_nsec += ns; in timespec_add()
69 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
70 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
71 ts.tv_sec++; in timespec_add()
73 return ts; in timespec_add()
A Dadjtick.c40 unsigned long long ts_to_nsec(struct timespec ts) in ts_to_nsec() argument
42 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
47 struct timespec ts; in nsec_to_ts() local
49 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
50 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
52 return ts; in nsec_to_ts()
A Dalarmtimer-suspend.c86 struct timespec ts; in sigalarm() local
88 clock_gettime(alarm_clock_id, &ts); in sigalarm()
91 delta_ns = timespec_sub(start_time, ts); in sigalarm()
94 printf("ALARM(%i): %ld:%ld latency: %lld ns ", alarmcount, ts.tv_sec, in sigalarm()
95 ts.tv_nsec, delta_ns); in sigalarm()
/tools/perf/util/bpf_skel/
A Dkwork_top.bpf.c150 delta = ts - from_timestamp; in on_sched_out()
169 pelem->timestamp = ts; in on_sched_in()
188 __u64 ts = bpf_ktime_get_ns(); in on_switch() local
190 on_sched_out(prev, ts, cpu); in on_switch()
191 on_sched_in(next, ts); in on_switch()
209 __u64 ts = bpf_ktime_get_ns(); in on_irq_handler_entry() local
222 .timestamp = ts, in on_irq_handler_entry()
245 __u64 ts = bpf_ktime_get_ns(); in on_irq_handler_exit() local
261 delta = ts - from_timestamp; in on_irq_handler_exit()
294 .timestamp = ts, in on_softirq_entry()
[all …]
/tools/testing/selftests/ptp/
A Dtestptp.c163 struct timespec ts; in main() local
406 ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); in main()
420 clock_gettime(clkid, &ts); in main()
429 ts.tv_sec = seconds; in main()
430 ts.tv_nsec = 0; in main()
572 pct = &sysoff->ts[0]; in main()
615 soe->ts[i][0].nsec); in main()
631 soe->ts[i][1].sec, soe->ts[i][1].nsec); in main()
635 soe->ts[i][2].sec, in main()
640 soe->ts[i][2].sec, in main()
[all …]
/tools/leds/
A 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()
A 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/proc/
A Dproc-uptime.h28 struct timespec ts; in clock_boottime() local
31 err = clock_gettime(CLOCK_BOOTTIME, &ts); in clock_boottime()
34 return (ts.tv_sec * 100) + (ts.tv_nsec / 10000000); in clock_boottime()
/tools/perf/scripts/python/
A Dsched-migration.py232 def get_time_slice(self, ts): argument
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:
270 ts = self[idx]
271 rq = ts.rqs[cpu]
274 raw += "Timestamp : %d.%06d\n" % (ts.start / (10 ** 9), (ts.start % (10 ** 9)) / 1000)
275 raw += "Duration : %6d us\n" % ((ts.end - ts.start) / (10 ** 6))
348 ts = self.timeslices.get_time_slice(headers.ts())
352 ts = self.timeslices.get_time_slice(headers.ts())
[all …]
A Dintel-pt-events.py232 ts = sample["time"]
239 …%-5u [%03u] %9u.%09u " % (machine_pid, vcpu, comm, pid, tid, cpu, ts / 1000000000, ts %1000000000)
241 return "%16s %5u/%-5u [%03u] %9u.%09u " % (comm, pid, tid, cpu, ts / 1000000000, ts %1000000000)
422 ts = sample["time"]
424 if glb_time != ts:
425 glb_time = ts
445 def auxtrace_error(typ, code, cpu, pid, tid, ip, ts, msg, cpumode, *x): argument
457 …(machine_pid, vcpu, "Trace error", pid, tid, cpu, ts / 1000000000, ts %1000000000, typ, code, msg,…
460 ("Trace error", pid, tid, cpu, ts / 1000000000, ts %1000000000, typ, code, msg, ip))
466 def context_switch(ts, cpu, pid, tid, np_pid, np_tid, machine_pid, out, out_preempt, *x): argument
[all …]
/tools/perf/trace/beauty/
A Dtimespec.c10 struct timespec *ts = (struct timespec *)arg->augmented.args->value; in syscall_arg__scnprintf_augmented_timespec() local
12 …return scnprintf(bf, size, "{ .tv_sec: %" PRIu64 ", .tv_nsec: %" PRIu64 " }", ts->tv_sec, ts->tv_n… in syscall_arg__scnprintf_augmented_timespec()

Completed in 45 milliseconds

12345