lkml.org 
[lkml]   [2013]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC] Full syscall argument decode in "perf trace"
    On Wed, Sep 18, 2013 at 4:33 PM, Arnaldo Carvalho de Melo
    <acme@redhat.com> wrote:
    >> > Look at the tmp.perf/trace2 branch in my git repo, tglx and Ingo added a
    >> > tracepoint to vfs_getname to use that.
    >>
    >> I know that this is the way how to fetch syscall args without stopping,
    >> yes.
    >>
    >> The problem: ~100 more tracepoints need to be added merely to get
    >> to the point where strace already is, wrt quality of syscall decoding.
    >> strace has nearly 300 separate custom syscall formatting functions,
    >> some of them quite complex.
    >>
    >> If we need to add syscall stopping feature (which, as I said above,
    >> will be necessary anyway IMO), then syscall decoding can be as good
    >> as strace *already*. Then, gradually more tracepoints are added
    >> to make it faster.
    >>
    >> I am thinking about going into this direction.
    >>
    >> Therefore my question should be restated as:
    >>
    >> Would perf developers accept the "syscall pausing" feature,
    >> or it won't be accepted?
    >
    > Do you have some patch for us to try?

    I have a patch which is a bit strace specific: it sidesteps
    the question of the synchronization between traced process
    and its tracer by using ptrace's existing method of reporting stops.

    This works for strace, and is very easy to implement.
    Naturally, other tracers (e.g. "perf trace" wouldn't
    want to start using ptrace! Synchronization needs
    to be done in some other way, not as a ptrace stop.

    For one, the stopping flag needs to be a counter, so that
    more than one tracer can use this feature concurrently.

    But anyway, I am attaching it.

    It adds a new flag, attr.sysexit_stop, which makes process stop
    at next syscall exit when this tracepoint overflows.

    --
    vda
    [unhandled content-type:application/octet-stream]
    \
     
     \ /
      Last update: 2013-09-26 10:01    [W:2.572 / U:0.328 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site