From: Masami Hiramatsu <mhiramat@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
Hideo AOKI <haoki@redhat.com>,
mingo@elte.hu, linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: Kernel marker has no performance impact on ia64.
Date: Thu, 12 Jun 2008 13:05:52 -0400 [thread overview]
Message-ID: <48515770.4020002@redhat.com> (raw)
In-Reply-To: <20080612164318.GB17814@redhat.com>
Hi,
Frank Ch. Eigler wrote:
> Hi -
>
> On Thu, Jun 12, 2008 at 12:16:35PM -0400, Masami Hiramatsu wrote:
>> [...]
>>> Think this through. How should systemtap (or another user-space
>>> separate-compiled tool like lttng) do this exactly?
>>> [...]
>>> (d) or another way?
>> use a lookup table. we can expect that the marking points which
>> regularly inserted in the upstream kernel are stable(not so
>> frequently change). In that case, we can easily maintain
>> a lookup table which has pairs of format strings like as
>> "sched_switch(struct task_struct * next, struct task_struct * prev)":"next %p prev %p"
>> out of tree. Thus, you can use the printf-style format parser.
>
> That's an interesting idea, but errors in this table would themselves
> only be caught at C compilation time.
Hmm, why would you think so?
I think if we can't find corresponding entry from the lookup table,
it becomes an error.
> Worse, it does nothing helpful
> for actually pulling out the next/prev fields of interest. Remember,
> real tracing users don't care so much about the task_struct pointers,
> but about observable things like PIDs. Systemtap would be back to the
> debuginfo or C-header-guessing/parsing job (or embedded-C, yuck).
Yeah, but that is same as previous marker. It depends on what parameter
the kernel pass to the marker. I mean, the parameter issue is not an
issue of the marker framework, but a discussion point of marking points.
> This is another reason why markers are a nice solution. They allow
> passing of actual useful values: not just the %p pointers but the most
> interesting derived values (e.g., prev->pid). And they do this
> *efficiently* - in out-of-line code that imposes no measurable
> overhead in the normal case..
Even if you use trace_mark() markers, you have to post a kernel patch
which passes the prev->pid to the marking point and to discuss it.
for example,
DEFINE_TRACE(sched_switch, (int prev_pid, int next_pid), prev_pid, next_pid)
But it might not so general, we have to discuss what parameters are enough
good for each marking point.
>
>
> - FChE
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com
next prev parent reply other threads:[~2008-06-12 17:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 22:12 Kernel marker has no performance impact on ia64 Hideo AOKI
2008-06-02 22:32 ` Peter Zijlstra
2008-06-02 23:21 ` Mathieu Desnoyers
2008-06-03 6:07 ` Takashi Nishiie
2008-06-04 4:58 ` Masami Hiramatsu
2008-06-04 23:26 ` Mathieu Desnoyers
2008-06-04 23:40 ` Masami Hiramatsu
2008-06-04 22:27 ` Peter Zijlstra
2008-06-04 23:22 ` Mathieu Desnoyers
2008-06-05 8:12 ` Peter Zijlstra
2008-06-05 14:28 ` Masami Hiramatsu
2008-06-12 14:04 ` Mathieu Desnoyers
2008-06-12 15:31 ` Masami Hiramatsu
2008-06-12 13:53 ` Mathieu Desnoyers
2008-06-12 14:27 ` Peter Zijlstra
2008-06-12 15:53 ` Frank Ch. Eigler
2008-06-12 16:16 ` Masami Hiramatsu
2008-06-12 16:43 ` Frank Ch. Eigler
2008-06-12 16:56 ` Peter Zijlstra
2008-06-12 22:10 ` Mathieu Desnoyers
2008-06-12 17:05 ` Masami Hiramatsu [this message]
2008-06-12 17:48 ` Frank Ch. Eigler
2008-06-12 19:34 ` Masami Hiramatsu
2008-06-13 4:19 ` Takashi Nishiie
2008-06-13 18:02 ` Masami Hiramatsu
2008-06-16 2:58 ` Takashi Nishiie
2008-06-12 16:53 ` Peter Zijlstra
2008-06-12 17:38 ` Frank Ch. Eigler
2008-06-13 11:01 ` Peter Zijlstra
2008-06-13 14:17 ` Frank Ch. Eigler
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=48515770.4020002@redhat.com \
--to=mhiramat@redhat.com \
--cc=fche@redhat.com \
--cc=haoki@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox