Re: [RFC PATCH -tip 1/2 v2] add tracepoints for pagecache

From: Keiichi KII
Date: Mon Jan 25 2010 - 17:19:52 EST


(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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/