From: Ingo Molnar <mingo@elte.hu>
To: "Theodore Tso" <tytso@mit.edu>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Linux Kernel Developers List" <linux-kernel@vger.kernel.org>,
"Tom Zanussi" <tzanussi@gmail.com>,
"Li Zefan" <lizf@cn.fujitsu.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>
Subject: Re: [PATCH, RFC 0/3] Improvements to the tracing documentation
Date: Tue, 14 Apr 2009 00:55:42 +0200 [thread overview]
Message-ID: <20090413225542.GJ8514@elte.hu> (raw)
In-Reply-To: <20090413223526.GB32182@mit.edu>
* Theodore Tso <tytso@mit.edu> wrote:
> On Mon, Apr 13, 2009 at 11:31:24PM +0200, Ingo Molnar wrote:
> > Cool. [ And i guess you'll like the per tracepoint filter
> > expressions too :-) ]
>
> I haven't played with them yet, but I was looking over the source
> code at them (since they aren't documented yet :-). It looks like
> at the moment only integer matches are allowed, right? That's a
> bit of an issue for me, since one of the things I'd really like to
> be able to do is filter based on devname (i.e., sda2). (Most of
> the time we only want to collect information for a particular
> block device or filesystem.)
You can already do:
aldebaran:/debug/tracing/events/sched/sched_process_wait> echo "comm == Xorg" > filter
aldebaran:/debug/tracing/events/sched/sched_process_wait> cat filter
comm == Xorg
But string values depends on the type of the format field - so you
cannot do string matches on integer fields.
For kdev_t matches i think we'll need native support for that type -
in addition to the integer/string types. It will come up in other
places as well and user-space knows about devices as well.
> Actually, the fact that I'm having to drop some 32 bytes for each
> jbd2 and ext4 trace log for the bdevname in the ring buffer is
> really for the birds. What I really want to do is just to drop in
> the dev_t, and then for the tracing infrastructure to have an
> efficient (cached) way of taking the dev_t and turning that back
> into struct block_device at TP_printk time so we can print the
> bdevname when it's needed. We deifnitely don't want to be calling
> bdget() in fs/block_dev.c each time we print a line in the tracing
> buffer! I'm guessing that's something the blktrace tracer would
> find handy as well.
Yeah.
It could be worked around right now by converting it to an integer
but i think what we want is native support for kdev_t, together with
all the usual convenience forms of specifying it: sda1 should work
the same way as 8:1 or 0801. Even /dev/sda1 should be recognized in
a filter expression.
> Of course having more kernel code play with dev_t's directly isn't
> considered politically correct in some circles, but tough. :-) We
> can't exactly drop a pointer to a struct block_device in the trace
> buffer, since there's no guarantee it will still be valid when we
> read it out. Dropping in a dev_t is exactly what we want. It
> would be nice though if there was a way to specify a major/minor
> number as the filter predicate for the dev_t, and not to have the
> user generate the MAJOR/MINOR encoding. So some way of parsing
> "MKDEV(8, 4)" as the input to the filter predicate would probably
> be a really good thing to do.
Yeah, exactly. We already have smarts in init/* to recognize certain
device string patterns (for rootdev specification) - that could be
factored out (it already is to a large degree) and reused. We dont
need full udev enumeration really - we just need the most common
variants.
Regardless of whether it's considered politically correct or not ;-)
It's clearly useful.
Ingo
next prev parent reply other threads:[~2009-04-13 22:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-11 19:51 [PATCH, RFC 0/3] Improvements to the tracing documentation Theodore Ts'o
2009-04-11 19:51 ` [PATCH, RFC 1/3] tracing: Update documentation references in kernel/trace/Kconfig Theodore Ts'o
2009-04-11 19:51 ` [PATCH, RFC 2/3] tracing: Document the event tracing system Theodore Ts'o
2009-04-11 19:51 ` [PATCH, RFC 3/3] tracing: Add documentation for the power tracer Theodore Ts'o
2009-04-11 20:44 ` Joe Perches
2009-04-11 21:48 ` Arjan van de Ven
2009-04-12 9:28 ` [tip:tracing/core] " Theodore Ts'o
2009-04-12 13:00 ` Theodore Ts'o
2009-04-12 9:27 ` [tip:tracing/core] tracing: Document the event tracing system Theodore Ts'o
2009-04-12 9:40 ` Cyrill Gorcunov
2009-04-12 13:00 ` Theodore Ts'o
2009-04-12 9:25 ` [PATCH, RFC 0/3] Improvements to the tracing documentation Ingo Molnar
2009-04-12 12:15 ` Theodore Tso
2009-04-12 13:01 ` Ingo Molnar
2009-04-12 17:23 ` Theodore Tso
2009-04-12 17:32 ` [PATCH 1/2] jbd2: Convert instrumentation from markers to tracepoints Theodore Ts'o
2009-04-12 17:32 ` [PATCH 2/2] ext4: " Theodore Ts'o
2009-04-13 21:37 ` Ingo Molnar
2009-04-13 21:31 ` [PATCH, RFC 0/3] Improvements to the tracing documentation Ingo Molnar
2009-04-13 22:35 ` Theodore Tso
2009-04-13 22:55 ` Ingo Molnar [this message]
2009-04-13 23:39 ` Theodore Tso
2009-04-13 23:47 ` Ingo Molnar
2009-04-14 5:22 ` Tom Zanussi
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=20090413225542.GJ8514@elte.hu \
--to=mingo@elte.hu \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=rostedt@goodmis.org \
--cc=tytso@mit.edu \
--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