From: Theodore Tso <tytso@mit.edu>
To: Christoph Hellwig <hch@infradead.org>
Cc: Josh Stone <jistone@redhat.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ext4: Add a stub for mpage_da_data in the trace header
Date: Wed, 30 Sep 2009 10:20:49 -0400 [thread overview]
Message-ID: <20090930142049.GH24383@mit.edu> (raw)
In-Reply-To: <20090930133335.GA14585@infradead.org>
On Wed, Sep 30, 2009 at 09:33:35AM -0400, Christoph Hellwig wrote:
> On Tue, Sep 29, 2009 at 02:40:07PM -0700, Josh Stone wrote:
> > The tracepoint ext4_da_write_pages has a struct mpage_da_data*
> > parameter, but that struct is only defined in fs/ext4/ext4.h. This
> > patch adds a forward declaration for that struct, so this tracepoint
> > header can still be used by tools like SystemTap.
>
> That's not what the tracepoints are for anyway. No hacks for out of
> tree crap like this please - just use the trace buffer directly like
> ftrace and then you don't actually need any data types.
>
Josh, you do realize that SystemTap can pull stuff out of the trace
buffer by examining information found in
/sys/kernel/debug/tracing/events/*/*/format
right? For example:
name: ext4_sync_fs
ID: 600
format:
field:unsigned short common_type; offset:0; size:2;
field:unsigned char common_flags; offset:2; size:1;
field:unsigned char common_preempt_count; offset:3; size:1;
field:int common_pid; offset:4; size:4;
field:int common_tgid; offset:8; size:4;
field:dev_t dev; offset:12; size:4;
field:int wait; offset:16; size:4;
print fmt: "dev %s wait %d", jbd2_dev_to_name(REC->dev), REC->wait
No need to for users to download gigabytes and gigabytes of DWARF
crapola (and for developers to grow old waiting for a kernel compile
with -g enabled to complete); SystemTap can just get what it needs
straight out of /sys/kernel/debug/tracing/events, and then reading
what it needs out of the ring buffer.
In any case I've added the blind structure pointer to
include/trace/events/ext4.h, but in the long term you're *much* better
off pulling the information you need from the ftrace ring buffer and
getting the information you need to interpret it out of
/sys/kernel/debug/tracing.
- Ted
next prev parent reply other threads:[~2009-09-30 14:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-29 21:40 [PATCH] ext4: Add a stub for mpage_da_data in the trace header Josh Stone
2009-09-30 13:33 ` Christoph Hellwig
2009-09-30 14:20 ` Theodore Tso [this message]
2009-09-30 19:45 ` Josh Stone
2009-09-30 21:23 ` Theodore Tso
2009-10-01 0:13 ` Josh Stone
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=20090930142049.GH24383@mit.edu \
--to=tytso@mit.edu \
--cc=hch@infradead.org \
--cc=jistone@redhat.com \
--cc=linux-kernel@vger.kernel.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.