Re: Counting System Calls

Alexander Kjeldaas (astor@guardian.no)
Sat, 18 Apr 1998 14:26:14 +0200


On Fri, Apr 17, 1998 at 06:21:54PM -0700, David S. Miller wrote:
> Date: Fri, 17 Apr 1998 18:23:36 -0700
> From: Craig Milo Rogers <rogers@ISI.EDU>
>
> >A bit radical, but why not make /sbin/init a shell script which does
> >strace -f -o /tmp/sclog -c -S calls /sbin/init.real
>
> Three reasons: Performance, performance, and performance! By
> the way, is tracing inherited by child processes?
>
> I didn't say it would be fast ;-) And yes, when you specify "-f" all
> children and further sub-children trace as well.
>

It would probably break some signals as a traced process isn't
properly considered to be the child of its parent process in
Linux. When a process is traced, you have to do a for_each_task
instead of traversing the child pointers in the task structure to find
all children. To do this you need to know if a process is traced and
act accordingly. This would be fixable as a side-effect of the
"pidhash" patch, but I wouldn't consider it very important until
people actually start doing the above :-).

astor

-- 
 Alexander Kjeldaas, Guardian Networks AS, Trondheim, Norway
 http://www.guardian.no/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu