<div dir="ltr">running the x86-64 Android strace on my desktop worked fine too. switching back to arm, it looks like the problem is something to do with adb rather than strace:<div><br></div><div><div>$ adb shell strace -c sleep 100</div>
<div>^C</div><div>$ adb shell</div><div>root@mako:/ # strace -c sleep 100</div><div>^CProcess 2294 detached</div><div>% time   seconds  usecs/call   calls   errors syscall</div><div>------ ----------- ----------- --------- --------- ----------------</div>
<div>100.00 Â Â 0.000153 Â Â Â Â Â 5 Â Â Â Â 34 Â Â Â Â Â mmap2</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 7 Â Â Â Â Â read</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 8 Â Â Â Â Â close</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â execve</div>
<div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â brk</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 8 Â Â Â Â Â sigaction</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â gettimeofday</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 7 Â Â Â Â Â munmap</div>
<div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 18 Â Â Â Â Â mprotect</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â prctl</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â sigaltstack</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â getrlimit</div>
<div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â fstat64</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 2 Â Â Â Â 2 madvise</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â fcntl64</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â futex</div>
<div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â set_tid_address</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 1 Â Â Â Â Â statfs64</div><div>Â 0.00 Â Â 0.000000 Â Â Â Â Â 0 Â Â Â Â 15 Â Â Â Â 7 openat</div><div>
 0.00   0.000000      0     1      set_tls</div>
<div>------ ----------- ----------- --------- --------- ----------------</div><div>100.00 Â Â 0.000153 Â Â Â Â Â Â Â Â Â 111 Â Â Â Â 9 total</div><div>root@mako:/ #Â </div><div><br></div><div>so whatever i was seeing doesn't look like an strace problem.</div>
<div><br></div><div>looks like adb just doesn't catch SIGINT to pass it on:</div><div><br></div><div>$ strace -f adb shell sleep 100<br></div><div>...</div><div><div>write(3, "shell:sleep 100", 15) Â Â Â Â = 15</div>
<div>read(3, "OKAY", 4) Â Â Â Â Â Â Â Â Â Â Â = 4</div><div>read(3, ^C <unfinished ...></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 8, 2014 at 2:11 PM, Dmitry V. Levin <span dir="ltr"><<a href="mailto:ldv@altlinux.org" target="_blank">ldv@altlinux.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<div class=""><br>
On Wed, May 07, 2014 at 04:54:40PM +0200, Bud Millwood wrote:<br>
> Hi all, I'm not on this list but I'll keep an eye out for a response<br>
> to this message.<br>
><br>
> In the past I noticed that if I ran "strace -c" against a process, I<br>
> could press CTRL-C and strace would print out the statistics it had<br>
> collected so far, then exit. It now seems to just exit without<br>
> printing any of the statistics.<br>
<br>
</div>Strange, it works for me, both in simple and in -p mode.<br>
For example:<br>
<br>
$ strace -c cat & sleep 1 && kill -INT $!<br>
[1] 19981<br>
Process 19985 detached<br>
% time   seconds  usecs/call   calls   errors syscall<br>
------ ----------- ----------- --------- --------- ----------------<br>
$ Â 27.65 Â Â 0.000060 Â Â Â Â Â 8 Â Â Â Â 8 Â Â Â Â Â mmap<br>
 14.29   0.000031      8     4      mprotect<br>
 10.14   0.000022      6     4      fstat<br>
 7.83   0.000017      9     2      open<br>
 7.83   0.000017      4     4      brk<br>
 6.45   0.000014      7     2     1 read<br>
 5.53   0.000012      12     1     1 access<br>
 5.07   0.000011      6     2      fadvise64<br>
 4.61   0.000010      5     2      close<br>
 4.61   0.000010      10     1      munmap<br>
 3.69   0.000008      8     1      execve<br>
 2.30   0.000005      5     1      arch_prctl<br>
------ ----------- ----------- --------- --------- ----------------<br>
100.00 Â Â 0.000217 Â Â Â Â Â Â Â Â Â Â 32 Â Â Â Â 2 total<br>
[1]+  Done           strace -c cat<br>
<br>
$ sleep 2 && sleep 2 & sleep 1; strace -cp $! & sleep 2 && kill -INT $!<br>
[1] 19986<br>
[2] 19989<br>
Process 19986 attached<br>
Process 19986 detached<br>
% time   seconds  usecs/call   calls   errors syscall<br>
------ ----------- ----------- --------- --------- ----------------<br>
$ Â 80.77 Â Â 0.000710 Â Â Â Â 355 Â Â Â Â 2 Â Â Â Â 1 wait4<br>
 15.81   0.000139     139     1      clone<br>
 2.62   0.000023      4     6      rt_sigprocmask<br>
 0.46   0.000004      2     2      rt_sigaction<br>
 0.34   0.000003      3     1      rt_sigreturn<br>
------ ----------- ----------- --------- --------- ----------------<br>
100.00 Â Â 0.000879 Â Â Â Â Â Â Â Â Â Â 12 Â Â Â Â 1 total<br>
[2]+  Done           strace -cp $!<br>
[1]-  Done           sleep 2 && sleep 2<br>
<br>
You aren't using -I1 option, are you?<br>
<span class=""><font color="#888888"><br>
<br>
--<br>
ldv</font></span><br></blockquote></div>
</div></div></div>