From: ebiederm@xmission.com (Eric W. Biederman)
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Randy Dunlap <randy.dunlap@oracle.com>,
Elias Oltmanns <eo@nebensachen.de>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Clark Williams <clark.williams@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jon Masters <jonathan@jonmasters.org>
Subject: Re: [PATCH -v2] ftrace: Documentation
Date: Mon, 14 Jul 2008 19:41:47 -0700 [thread overview]
Message-ID: <m1fxqbj2c4.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0807142212030.4530@gandalf.stny.rr.com> (Steven Rostedt's message of "Mon, 14 Jul 2008 22:18:09 -0400 (EDT)")
Steven Rostedt <rostedt@goodmis.org> writes:
>> Ok. So this is something simpler to use then SystemTap. Yeah.
>
> Yes, very similar. SystemTap may even hook into ftrace, and vice versa.
Got it.
>> It sounds like it is reasonable or at least semi reasonable to use
>> this as an unprivileged user.
>
> Currently only root can do the traces. Since some of the tracing can
> hurt the performance of the system.
Reasonable.
>> The easiest model to think of this in is a chroot that does pids as
>> well as the filesystem. In which case if you are inside one and
>> you use the tracer. You want pids that are meaningful in your
>> subset of userspace, and not the global ones.
>
> Some tracers do a trace at every function call. This uses the gcc -pg
> option to set up the start of each function to call profiling code.
> Dynamic ftrace is a on the fly code modification to maintain good
> performance while tracing is disabled.
>
> Because of this being such a high critical path, can I get the namespace
> pid information directly from the task structure. Any function that is
> called must also be careful to not fall back into the tracer. The trace
> deals with self recursion, but functions that call back to the tracer
> cause a bigger performance impact while tracing.
All of the interesting functions are inline so it shouldn't be a big deal.
Mostly they exist to keep the semantics clear as we refactor the code.
task_pid_nr(tsk) yields the global pid number, and is currently implemented as just tsk->pid.
task_pid(tsk) yields the struct pid.
task_pid_nr_ns(tsk) yields the pid number from the perspective of a specific
task.
struct pid is interesting because it is immune from pid roll over conflicts.
I don't know if that is any use to you or not.
stuct pid contains an embedded array of the pid_nrs one for each namespace the
struct pid is in.
Eric
next prev parent reply other threads:[~2008-07-15 2:52 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 16:46 [PATCH] ftrace: Documentation Steven Rostedt
2008-07-10 18:16 ` Jon Masters
2008-07-10 19:59 ` Elias Oltmanns
2008-07-10 20:28 ` Randy Dunlap
2008-07-11 0:02 ` Steven Rostedt
2008-07-11 0:37 ` [PATCH -v2] " Steven Rostedt
2008-07-11 19:16 ` Andrew Morton
2008-07-11 20:59 ` Steven Rostedt
2008-07-11 22:37 ` Andrew Morton
2008-07-11 23:16 ` Eric W. Biederman
2008-07-15 1:08 ` Steven Rostedt
2008-07-15 1:26 ` Eric W. Biederman
2008-07-15 1:43 ` Steven Rostedt
2008-07-15 1:59 ` Eric W. Biederman
2008-07-15 2:18 ` Steven Rostedt
2008-07-15 2:41 ` Eric W. Biederman [this message]
2008-07-15 3:05 ` Steven Rostedt
2008-07-15 3:29 ` Eric W. Biederman
2008-07-12 10:16 ` John Kacur
2008-07-16 10:10 ` Florian Weimer
2008-07-16 11:39 ` Steven Rostedt
2008-07-17 14:19 ` Christoph Hellwig
2008-07-18 2:47 ` Steven Rostedt
2008-07-20 11:16 ` Christoph Hellwig
2008-07-10 23:55 ` [PATCH] " Steven Rostedt
2008-07-11 7:51 ` Elias Oltmanns
2008-07-12 12:49 ` Abhishek Sagar
2008-07-15 14:39 ` Steven Rostedt
2008-07-15 15:33 ` Abhishek Sagar
2008-07-14 9:38 ` Peter Zijlstra
2008-07-14 18:02 ` David Teigland
2008-07-14 19:59 ` Steven Rostedt
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=m1fxqbj2c4.fsf@frodo.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=clark.williams@gmail.com \
--cc=eo@nebensachen.de \
--cc=jonathan@jonmasters.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=randy.dunlap@oracle.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.