[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1259224186.21397.85.camel@gandalf.stny.rr.com>
Date: Thu, 26 Nov 2009 03:29:46 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Pekka Enberg <penberg@...helsinki.fi>,
Li Zefan <lizf@...fujitsu.com>,
Frederic Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>, Mel Gorman <mel@....ul.ie>
Subject: Re: [PATCH 2/9] tracing: Convert some kmem events to DEFINE_EVENT
On Thu, 2009-11-26 at 08:57 +0100, Ingo Molnar wrote:
> * Pekka Enberg <penberg@...helsinki.fi> wrote:
>
> > Li Zefan kirjoitti:
> > >Use TRACE_EVENT_TEMPLATE to remove duplicate code:
> > >
> > > text data bss dec hex filename
> > > 333987 69800 27228 431015 693a7 mm/built-in.o.old
> > > 330030 69800 27228 427058 68432 mm/built-in.o
> > >
> > >8 events are converted:
> > >
> > > kmem_alloc: kmalloc, kmem_cache_alloc
> > > kmem_alloc_node: kmalloc_node, kmem_cache_alloc_node
> > > kmem_free: kfree, kmem_cache_free
> > > mm_page: mm_page_alloc_zone_locked, mm_page_pcpu_drain
> > >
> > >Signed-off-by: Li Zefan <lizf@...fujitsu.com>
> >
> > I have no idea what TRACE_EVENT_TEMPLATE is [...]
>
> Btw., the fact that it wasnt entirely obvious for you from the patch
> what it does, there's one rename we should do, to have more consistent
> and more self-explanatory naming:
>
> DECLARE_EVENT_CLASS(class)
>
> DEFINE_EVENT(class, event1)
> DEFINE_EVENT(class, event2)
> DEFINE_EVENT(class, event3)
>
> DEFINE_SINGLE_EVENT(single_event)
>
> Naming the 'standalone' variant like that signals this difference and
> encourages people to create classes/groups of events instead of creating
> many singular events.
I'm not really attached to the names, but I wouldn't go by it not being
obvious for Pekka as a reason for changing it. In the context of the
change log, if it were to say:
>Use DECLARE_EVENT_CLASS to remove duplicate code:
>
> text data bss dec hex filename
> 333987 69800 27228 431015 693a7 mm/built-in.o.old
> 330030 69800 27228 427058 68432 mm/built-in.o
>
>8 events are converted:
>
> kmem_alloc: kmalloc, kmem_cache_alloc
> kmem_alloc_node: kmalloc_node, kmem_cache_alloc_node
> kmem_free: kfree, kmem_cache_free
> mm_page: mm_page_alloc_zone_locked, mm_page_pcpu_drain
>
I'm not sure it would make it any more obvious to what the
class/template does. ;-)
-- Steve
--
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