This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix target_set tapset.


On 06/13/2009 04:10 PM, Przemyslaw Pawelczyk wrote:
> Add pid removal on exit syscall. Use dwarfless syscall probe aliases.
> Correct formatting.
> ---
[...]
> -probe syscall.fork.return
> +probe nd_syscall.fork.return

What do you think about preferring process.begin for utrace-enabled
kernels?  That should be lower overhead than a kprobe trap.

> +probe nd_syscall.exit
> +{
> +	delete _target_set[pid()]
>  }

The problem is that this makes target_set_report() useless after the
processes have exited (e.g. in an end probe).  I think we should just
trust that the target process won't beget more than MAXMAPENTRIES
children.  At the default 2048, that will probably be fine most of the time.

If you really want this, perhaps we could instead add the pid to a death
array, and then have a function to clear those out.  The clear could
either be explicitly called, or perhaps it would be an implicit call at
the end of target_set_report.  Then the calling script can do periodic
clear/reports if it knows there will be more than MAXMAPENTRIES children.


Josh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]