Re: [PATCH 4/6] trace: trace syscall in its handler not from ptrace handler

Vaibhav Nagarnaik
2012-03-29T03:03:27Z

On Wed, Mar 28, 2012 at 7:43 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> But instead you add a penalty for every syscall, even if tracing is
> disabled.  Not cool.

I just ran a small test binary which calls syscall(SYS_getuid) in a
tight loop and calculates the latency per syscall.

Without my patch: it is 70 ns/call
With my patch: it is 83 ns/call

So yes, it does add a bit of latency to the syscall even if tracing is
disabled. I wonder if I can change the redirection function so that it
doesn't add so much latency.

But if it doesn't seem to help, then I will not push this patch.

Vaibhav Nagarnaik