mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jason Baron <jbaron@redhat.com>, Tom Zanussi <tzanussi@gmail.com>,
	linux-kernel@vger.kernel.org, fweisbec@gmail.com,
	laijs@cn.fujitsu.com, rostedt@goodmis.org, peterz@infradead.org,
	mathieu.desnoyers@polymtl.ca, jiayingz@google.com,
	mbligh@google.com, fche@redhat.com
Subject: Re: [RFC] convert ftrace syscall tracer to TRACE_EVENT()
Date: Mon, 11 May 2009 19:44:37 -0700 (PDT)	[thread overview]
Message-ID: <20090512024437.F19ADFC35D@magilla.sf.frob.com> (raw)
In-Reply-To: Ingo Molnar's message of  Saturday, 9 May 2009 10:37:37 +0200 <20090509083737.GE3656@elte.hu>

> Firstly, it adds two new tracepoints to every system call. That is 
> unnecessary - we already have the TIF flag based callbacks, and we 
> can use the existing syscall attributes table to get to tracepoints 
> - without slow down (or impacting) the fast path in any way.

This is one of the key differences of this approach.  It has very different
trade-offs.  I'm afraid that you might be sweeping this issue under the rug
inadvertently.  I see two major thrusts of Jason's proposal, and I think we
should be clear about each of those on its own separate merits.

#1 is the mechanism for getting to a tracing path.

If you use TIF_SYSCALL_TRACE (or new equivalents) then this is a choice you
make for the task (or all tasks, or whichever subset you choose).  This
means every system call in that task takes the slow path for tracing.
(The slow path is slow primarily to enable fetching and changing all user
registers, which is not needed for just tracing syscall arguments/results.)

Conversely, an actual tracepoint in a syscall function or its wrapper
always affects every task, but only affects that particular syscall's code
path.  If the tracepoint on sys_reboot is enabled, that has no effect
whatsoever on the paths taken by any task's sys_read calls.  OTOH, if the
sys_read tracepoint is enabled (with whatever filtering), that makes each
and every sys_read call by each and every task go through the tracepoint
callback path.  The "collateral damage" overhead paid by "uninteresting"
tasks (whose tracepoint hits are all filtered out) is whatever cost the
filtering code has.

#2 is the richness of the method for handling syscall arguments.

(I have the impression this one was Jason's motivation.)  The new(ish)
syscall definition macros make it easy(ish) to pull out parameter types and
names statically at kernel build time, and do intelligent things with
those.  As Jason is already looking into in his second pass, you can find a
way to exploit this either with direct tracepoints, or via syscall register
values fetched with syscall_get_arguments().


Thanks,
Roland

      parent reply	other threads:[~2009-05-12  2:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 21:03 Jason Baron
2009-05-09  8:37 ` Ingo Molnar
2009-05-09 12:53   ` Frédéric Weisbecker
2009-05-09 13:33     ` Ingo Molnar
2009-05-09 13:50       ` Mathieu Desnoyers
2009-05-09 14:06         ` Frédéric Weisbecker
2009-05-09 14:15           ` Ingo Molnar
2009-05-09 14:29             ` Mathieu Desnoyers
2009-05-09 15:01               ` Frédéric Weisbecker
2009-05-09 15:24                 ` Mathieu Desnoyers
2009-05-09 14:47             ` Frédéric Weisbecker
2009-05-09 17:44         ` David Wagner
2009-05-09 14:02       ` Frédéric Weisbecker
2009-05-09 14:07         ` Ingo Molnar
2009-05-09 14:12           ` Frédéric Weisbecker
2009-05-09 15:36   ` Frank Ch. Eigler
2009-05-09 15:57     ` Mathieu Desnoyers
2009-05-09 16:32     ` Mathieu Desnoyers
2009-05-10  6:59   ` Tom Zanussi
2009-05-11 22:16   ` Jason Baron
2009-05-12  2:44   ` Roland McGrath [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090512024437.F19ADFC35D@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=fche@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=jiayingz@google.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mbligh@google.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tzanussi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome