[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1106071244540.4754@dhcp-27-109.brq.redhat.com>
Date: Tue, 7 Jun 2011 12:49:00 +0200 (CEST)
From: Lukas Czerner <lczerner@...hat.com>
To: "Amir G." <amir73il@...rs.sourceforge.net>
cc: Lukas Czerner <lczerner@...hat.com>, linux-ext4@...r.kernel.org,
tytso@....edu, Amir Goldstein <amir73il@...rs.sf.net>,
Yongqiang Yang <xiaoqiangnk@...il.com>
Subject: Re: [PATCH RFC 02/30] ext4: snapshot debugging support
On Tue, 7 Jun 2011, Amir G. wrote:
> >
> >> +#define snapshot_test_delay_progress(i, from, to, max) \
> >> + do { \
> >> + if (snapshot_enable_test[i] && \
> >> + (max) > snapshot_enable_test[i] && \
> >> + (from) <= (to) && (to) <= (max)) { \
> >> + unsigned long blocks_per_ms = \
> >> + do_div((max), snapshot_enable_test[i]); \
> >> + unsigned long x = do_div((from), blocks_per_ms);\
> >> + unsigned long y = do_div((to), blocks_per_ms); \
> >> + if (y > x) \
> >> + msleep_interruptible(y - x); \
> >> + } \
> >> + } while (0)
> >> +
> >> +#define snapshot_debug_l(n, l, f, a...) \
> >> + do { \
> >> + if ((n) <= snapshot_enable_debug && \
> >> + (l) <= SNAPSHOT_INDENT_MAX) { \
> >> + printk(KERN_DEBUG "snapshot: %s" f, \
> >> + snapshot_indent - (l), \
> >> + ## a); \
> >> + } \
> >> + } while (0)
> >
> > This can be done by tracepoints maybe ?
>
> can you add a generic string arg to a tracepoint?
Yes, you can print whatever you want with tracepoint printk. See
include/trace/events/ext4.h, Documentation/trace/tracepoints.txt and
Documentation/trace/tracepoints-analysis.txt
Thanks!
-Lukas
Powered by blists - more mailing lists