[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B5E1868.6090204@bx.jp.nec.com>
Date: Mon, 25 Jan 2010 17:17:12 -0500
From: Keiichi KII <k-keiichi@...jp.nec.com>
To: rostedt@...dmis.org
CC: linux-kernel@...r.kernel.org, lwoodman@...hat.com,
linux-mm@...ck.org, mingo@...e.hu, tzanussi@...il.com,
riel@...hat.com, akpm@...ux-foundation.org, fweisbec@...il.com,
Munehiro Ikeda <m-ikeda@...jp.nec.com>,
Atsushi Tsuji <a-tsuji@...jp.nec.com>
Subject: Re: [RFC PATCH -tip 1/2 v2] add tracepoints for pagecache
(2010年01月22日 21:28), Steven Rostedt wrote:
>> +TRACE_EVENT(remove_from_page_cache,
>> +
>> + TP_PROTO(struct address_space *mapping, pgoff_t offset),
>> +
>> + TP_ARGS(mapping, offset),
>> +
>> + TP_STRUCT__entry(
>> + __field(dev_t, s_dev)
>> + __field(ino_t, i_ino)
>> + __field(pgoff_t, offset)
>> + ),
>> +
>> + TP_fast_assign(
>> + __entry->s_dev = mapping->host->i_sb->s_dev;
>> + __entry->i_ino = mapping->host->i_ino;
>> + __entry->offset = offset;
>> + ),
>> +
>> + TP_printk("s_dev=%u:%u i_ino=%lu offset=%lu", MAJOR(__entry->s_dev),
>> + MINOR(__entry->s_dev), __entry->i_ino, __entry->offset)
>> +);
>> +
>
> The above qualify in converting to templates or DECLACE_TRACE_CLASS, and
> DEFINE_EVENT, That is, rename the above TRACE_EVENT into
> DECLARE_TRACE_CLASS, and then have the other one be a DEFINE_EVENT().
> See the trace/event/sched.h for examples.
>
> The TRACE_EVENT can add a bit of code, so use DECLARE_TRACE_CLASS when
> possible and it will save on the size overhead.
Thank you for your information. I'll fix it next time.
Thanks,
Keiichi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists