Re: Counting System Calls

David S. Miller (davem@dm.cobaltmicro.com)
Fri, 17 Apr 1998 17:49:39 -0700


Date: Fri, 17 Apr 1998 23:02:10 +0200 (CEST)
From: MOLNAR Ingo <mingo@chiara.csoma.elte.hu>

On Fri, 17 Apr 1998, Craig Milo Rogers wrote:
> That counts a single process' calls. I was thinking about
> count of all system calls (summed across all processes) from boot-up
> on. This would be a useful tool in the context of the proposed
> modular system call mechanism.

ah, i understand.

but there is a granularity problem i think. With modules we 'waste' about
2K per module due to 4K page sizes. (every module has to have it's own set
of pages). With 183 syscalls we'd waste much more 'partial pages', about
183*2K=366K resident memory, brrr.

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

The only problem is to get / mounted rw at boot time.
The above is real dangerous, you'll be in single user mode a lot
getting it to work the first few times, boot command line args like
init=/bin/sh are your friend ;-)

Later,
David S. Miller
davem@dm.cobaltmicro.com

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