lkml.org 
[lkml]   [2009]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/9] tracing: Convert some kmem events to DEFINE_EVENT
From
Date
On Thu, 2009-11-26 at 09:24 +0200, Pekka Enberg wrote:

> I have no idea what TRACE_EVENT_TEMPLATE is but the space savings are
> convincing enough! I assume this is going into -tip?

TRACE_EVENT_TEMPLATE acts just like TRACE_EVENT but it does not create
the trace point. It does create general functions described by the
template. These are the functions to record data and how to print that
data, and show its format to userspace.

DEFINE_EVENT is used to hook an actual trace point up with the functions
created by the template.

There are a lot of events that are almost identical except for their
names. Using TRACE_EVENT() itself will create the functions to record
the data, print it, and show the format for each event, even though most
of these events are identical except for the name.

Christoph Hellwig was killed by this, since he had hundreds of
TRACE_EVENTS all with the same data. After converting it to the
templates, he saved a hell of a lot of space.

-- Steve




\
 
 \ /
  Last update: 2009-11-26 08:41    [W:0.053 / U:0.756 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site