fixup! syscall: track syscall system time a bit more explicitly

This commit is contained in:
Eugene Syromyatnikov 2018-09-27 07:41:33 +02:00
parent 4ed4a2ffcc
commit 0fa594e3e8

View File

@ -825,14 +825,16 @@ syscall_entering_finish(struct tcb *tcp, int res)
/* Start tracking system time */
if (cflag) {
if (debug_flag && ts_nz(&dt)) {
if (debug_flag) {
struct timespec dt;
ts_sub(&dt, &tcp->stime, &tcp->ltime);
debug_func_msg("pid %d: %.9f seconds of system time "
"spent since the last syscall exit",
tcp->pid, ts_float(&dt));
if (ts_nz(&dt))
debug_func_msg("pid %d: %.9f seconds of system "
"time spent since the last "
"syscall exit",
tcp->pid, ts_float(&dt));
}
tcp->ltime = tcp->stime;