RE: Why return probes of some syscalls sometimes are not called?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, March 9, 2017 4:38 PM Steven Rostedt [mailto:rostedt@xxxxxxxxxxx] wrote:
> On Thu, 9 Mar 2017 15:30:42 +0000
> "Dorau, Lukasz" <lukasz.dorau@xxxxxxxxx> wrote:
> 
> > On Thursday, March 9, 2017 4:21 PM Steven Rostedt wrote:
> > > On Thu, 9 Mar 2017 15:01:38 +0000 (UTC)
> > > Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:
> > >
> > >
> > > > Another more likely scenario is if a multithreaded process
> > > > has many threads blocked (e.g. on a futex), and one of the threads
> > > > exits cleanly or forks. I suspect the kernel will just tear down the
> > > > other threads without hitting syscall exit.
> > >
> > > Maybe, if this happens multiple times, it could cause those kinds of
> > > numbers. A fork was done zero times according to the numbers. Maybe
> > > exit should be measured too.
> > >
> >
> > I have run the test again with exit:
> >
> > Results (60 sec):
> > futex:       p 2968     r 401      (86% did not return (2567))
> > poll:        p 13251    r 3957     (70% did not return (9294))
> > epoll_wait:  p 1485     r 556      (62% did not return (929))
> > select:      p 8063     r 8066     (OK)
> > fork:        p 0        r 0        (OK)
> > vfork:       p 4        r 4        (OK)
> > clone:       p 6962     r 6962     (OK)
> > exit:        p 3        r 0        (100% did not return (3))
> 
> I expected exit not to have a return, that's the property of exit. But
> it shows that the above poll and friends is not because of exit and
> fork.
> 
> Can you change your script to use syscall tracepoints instead of
> retprobes?
> 

Here you are:

https://gist.github.com/ldorau/36d87640ff0659a483342d490b66f034

KProbes results (60 sec):
futex:       p 14671    r 1808     (87% did not return (12863))
poll:        p 31833    r 2099     (93% did not return (29734))
epoll_wait:  p 20852    r 4761     (77% did not return (16091))
select:      p 12331    r 12327    (0% did not return (4))
mmap:        p 2090     r 2090     (OK)
open:        p 4155     r 4155     (OK)
close:       p 4720     r 4720     (OK)
write:       p 11328    r 11328    (OK)
read:        p 22233    r 22233    (OK)
exit:        p 14       r 0        (100% did not return (14))
fork:        p 0        r 0        (OK)
vfork:       p 0        r 0        (OK)
clone:       p 48       r 48       (OK)
execve:      p 17       r 17       (OK)

Tracepoints results (60 sec):
futex:       p 14639    r 14632    (0% did not return (7))
poll:        p 31833    r 31834    (OK)
epoll_wait:  p 20852    r 20852    (OK)
select:      p 12330    r 12328    (0% did not return (2))
mmap:        p 2090     r 2090     (OK)
open:        p 4155     r 4171     (OK)
close:       p 4720     r 4720     (OK)
write:       p 11327    r 11328    (OK)
read:        p 22233    r 22233    (OK)
exit:        p 14       r 0        (100% did not return (14))

Lukasz

--
To unsubscribe from this list: send the line "unsubscribe linux-trace-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux