From ee3b0f6e2e053c63a22950421e05ff93ebc3cd73 Mon Sep 17 00:00:00 2001 From: Diomidis Spinellis Date: Tue, 12 May 2009 20:42:12 +0000 Subject: Add -c option to summarize number of calls, errors, and system time. Reviewed by: alfred --- usr.bin/truss/syscall.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.bin/truss/syscall.h') diff --git a/usr.bin/truss/syscall.h b/usr.bin/truss/syscall.h index 39a796a71370..484bb5d42197 100644 --- a/usr.bin/truss/syscall.h +++ b/usr.bin/truss/syscall.h @@ -57,10 +57,14 @@ struct syscall { int nargs; /* actual number of meaningful arguments */ /* Hopefully, no syscalls with > 10 args */ struct syscall_args args[10]; + struct timespec time; /* Time spent for this call */ + int ncalls; /* Number of calls */ + int nerror; /* Number of calls that returned with error */ }; struct syscall *get_syscall(const char*); char *print_arg(struct syscall_args *, unsigned long*, long, struct trussinfo *); void print_syscall(struct trussinfo *, const char *, int, char **); void print_syscall_ret(struct trussinfo *, const char *, int, char **, int, - long); + long, struct syscall *); +void print_summary(struct trussinfo *trussinfo); -- cgit v1.2.3