I am currently analyzing a command on Solaris that reads from a file and has very low performance. The truss -D
commands shows me read
system calls taking up to 0.03 seconds, but when I use truss -E
, they are always either 0.0000 or 0.0001 (two orders of magnitude lower than with the -D
option). In the man
page, it says:
-D
Includes a time delta on each line of trace output. The
value appears as a field containing seconds.fraction and
represents the elapsed time for the LWP that incurred
the event since the last reported event incurred by that
LWP. Specifically, for system calls, this is not the
time spent within the system call.
-E
Includes a time delta on each line of trace output. The
value appears as a field containing seconds.fraction and
represents the difference in time elapsed between the
beginning and end of a system call.
In contrast to the -D option, this is the amount of
time spent within the system call.
So the -E
option measures the actual time spent within the system call, while -D
does not... Can anyone explain what exactly is it that makes that difference? What is being done in the remaining time "outside" the system call?