Noteworthy changes in release ?.? (????-??-??)
==============================================
+* Improvements
+ * Added -w option to produce stats on syscall latency
+
Noteworthy changes in release 4.8 (2013-06-03)
==============================================
/* Per-syscall stats structure */
struct call_counts {
- /* system time spent in syscall (not wall clock time) */
+ /* time may be total latency or system time */
struct timeval time;
int calls, errors;
};
}
if (tv_cmp(tv, &shortest) < 0)
shortest = *tv;
- tv_add(&cc->time, &cc->time, tv);
+ tv_add(&cc->time, &cc->time, count_wallclock ? &wtv : tv);
}
static int
extern bool debug_flag;
extern bool Tflag;
extern bool iflag;
+extern bool count_wallclock;
extern unsigned int qflag;
extern bool not_failing_only;
extern bool show_fd_path;
Show the time spent in system calls. This records the time
difference between the beginning and the end of each system call.
.TP
+.B \-w
+Summarise the time difference between the beginning and end of
+each system call. The default is to summarise the system time.
+.TP
.B \-v
Print unabbreviated versions of environment, stat, termios, etc.
calls. These structures are very common in calls and so the default
bool debug_flag = 0;
bool Tflag = 0;
bool iflag = 0;
+bool count_wallclock = 0;
unsigned int qflag = 0;
/* Which WSTOPSIG(status) value marks syscall traps? */
static unsigned int syscall_trap_sig = SIGTRAP;
-p pid... / [-D] [-E var=val]... [-u username] PROG [ARGS]\n\
-c -- count time, calls, and errors for each syscall and report summary\n\
-C -- like -c but also print regular output\n\
+-w -- summarise syscall latency (default is system time)\n\
-d -- enable debug output to stderr\n\
-D -- run tracer process as a detached grandchild, not as parent\n\
-f -- follow forks, -ff -- with output into separate files\n\
#endif
qualify("signal=all");
while ((c = getopt(argc, argv,
- "+b:cCdfFhiqrtTvVxyz"
+ "+b:cCdfFhiqrtTvVwxyz"
"D"
"a:e:o:O:p:s:S:u:E:P:I:")) != EOF) {
switch (c) {
case 'T':
Tflag = 1;
break;
+ case 'w':
+ count_wallclock = 1;
+ break;
case 'x':
xflag++;
break;
error_msg_and_die("(-c or -C) and -ff are mutually exclusive");
}
+ if (count_wallclock && !cflag) {
+ error_msg_and_die("-w must be given with (-c or -C)");
+ }
+
/* See if they want to run as another user. */
if (username != NULL) {
struct passwd *pent;