Your message dated Tue, 15 Oct 2024 14:08:27 +0200 with message-id <CA+6XHwSnXZn0tfjtXst_VrBZ3Y5P=kcdpjwz7ff5bnorvp0...@mail.gmail.com> and subject line Re: strace: Patch to add minimum / maximum time spent in syscall has caused the Debian Bug report #240945, regarding strace: Patch to add minimum / maximum time spent in syscall to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 240945: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=240945 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: strace Version: 4.5.2-1 Severity: wishlist The following patch makes strace -c print out the minum and maximum time spent in a certain syscall. This is useful to see where an application stalls. --- strace-4.5.2.orig/syscall.c +++ strace-4.5.2/syscall.c @@ -224,6 +224,8 @@ static int call_count[MAX_QUALS]; static int error_count[MAX_QUALS]; static struct timeval tv_count[MAX_QUALS]; +static struct timeval tv_shortest[MAX_QUALS]; +static struct timeval tv_longest[MAX_QUALS]; static int sorted_count[MAX_QUALS]; static struct timeval shortest = { 1000000, 0 }; @@ -2171,6 +2173,8 @@ shortest = tv; tv_add(&tv_count[tcp->scno], &tv_count[tcp->scno], &tv); + if (call_count[tcp->scno]==1 || tv_cmp(&tv,&tv_shortest[tcp->scno])<0) memcpy(tv_shortest+tcp->scno,&tv,sizeof(struct timeval)); + if (call_count[tcp->scno]==1 || tv_cmp(&tv,&tv_longest[tcp->scno])>0) memcpy(tv_longest+tcp->scno,&tv,sizeof(struct timeval)); tcp->flags &= ~TCB_INSYSCALL; return 0; } @@ -2580,11 +2584,11 @@ } if (sortfun) qsort((void *) sorted_count, nsyscalls, sizeof(int), sortfun); - fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n", + fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %16s %8.8s %8.8s\n", "% time", "seconds", "usecs/call", - "calls", "errors", "syscall"); - fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %-16.16s\n", - dashes, dashes, dashes, dashes, dashes, dashes); + "calls", "errors", "syscall","shortest","longest"); + fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %-16.16s %8.8s %8.8s\n", + dashes, dashes, dashes, dashes, dashes, dashes, dashes, dashes); for (i = 0; i < nsyscalls; i++) { j = sorted_count[i]; if (call_count[j] == 0) @@ -2595,11 +2599,15 @@ else error_str[0] = '\0'; percent = 100.0*tv_float(&tv_count[j])/tv_float(&tv_cum); - fprintf(outf, "%6.2f %4ld.%06ld %11ld %9d %9.9s %s\n", + fprintf(outf, "%6.2f %4ld.%06ld %11ld %9d %9.9s %16s %01ld.%06ld %01ld.%06ld\n", percent, (long) tv_count[j].tv_sec, (long) tv_count[j].tv_usec, (long) 1000000 * dtv.tv_sec + dtv.tv_usec, - call_count[j], error_str, sysent[j].sys_name); + call_count[j], error_str, sysent[j].sys_name, + (long) tv_shortest[j].tv_sec, + (long) tv_shortest[j].tv_usec, + (long) tv_longest[j].tv_sec, + (long) tv_longest[j].tv_usec); } fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %-16.16s\n", dashes, dashes, dashes, dashes, dashes, dashes); -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.4 Locale: LANG=C, LC_CTYPE=C Versions of packages strace depends on: ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an -- no debconf information
--- End Message ---
--- Begin Message ---Version: 5.10-1 On Mon, 30 Mar 2020 22:32:23 +0200 Eugene Syromiatnikov <[email protected]> wrote: > Control: tags -1 +fixed-upstream > > The issue has been fixed in commit 609df3bad702 "count: add information about > minimum and maximum call duration", to be included in the next strace release > (version 5.6). >
--- End Message ---

