[PATCH 0/3] optimize -yy option

Masatake YAMATO yamato at redhat.com
Thu Mar 19 16:17:27 UTC 2015


-yy option of strace is really useful but slow especially for inet
sockets because the current implementation of socket diag provides
only an interface returning ALL inet sockets. Filtering by an address
is prepared but it doesn't help strace; strace wants filtering by an
inode number of socketfs.

I'm working on improving the performance of -yy option.
Two approaches:

A. adding "filtering by inode number" to socket diag of linux, and
B. adding a layer for caching addresses of inet socket to strace

This patch series implement B.

B. has some limitations. It has no effects other than TCP(v6) socket.
B. doesn't improve the performance for UDP(v6) socket.
A. is superior to B. in this aspect.
However, A. requires user to update the installed linux.

A. is working in progress. A. and B. work well together.


Masatake YAMATO (3):
  Introduce socket address information caching(scache) layer
  Print the hit rate of socket address cache with -C option
  Adapt TCP and TCPv6 to the socket address caching layer

 defs.h        |   2 +
 socketutils.c | 360 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 strace.c      |   5 +-
 util.c        |  28 +++--
 4 files changed, 374 insertions(+), 21 deletions(-)

-- 
2.1.0





More information about the Strace-devel mailing list