lkml.org 
[lkml]   [2010]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-01-25 23:21    [W:0.048 / U:6.264 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site