]> granicus.if.org Git - strace/commit
syscall: track syscall system time a bit more explicitly
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 3 Sep 2018 02:57:13 +0000 (04:57 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 6 Aug 2019 13:38:20 +0000 (13:38 +0000)
commit2b786c95145f6fb2c4cb2a7a6a6fcf95db993570
tree5eaecfd8d339f40b4132efe8928690a4e9bfa50e
parente8ab8ef0d4596742c589c67cfe10320c135e0bf2
syscall: track syscall system time a bit more explicitly

Before, it relied on implicit assumptions that syscall-exit event is
right the next one after syscall-enter.  Also, there's some additional
debugging output that might help someone someday.

* count.c (count_syscall): Calculate system time as difference of tcp's
stime and ltime.
* defs.h (struct tcb): Add ltime, atime fields, remove dtime.
* strace.c (droptcb): Print total system time spent by a tcb.
(startup_tcb): Store initial system time in atime.
(next_event): Update stime directly.
* syscall.c (syscall_entering_finish): Store current system time in
tcb's ltime field.
(syscall_exiting_finish): Likewise.
count.c
defs.h
strace.c
syscall.c