lkml.org 
[lkml]   [2009]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: trace/events: DECLARE vs DEFINE semantic


Mathieu Desnoyers wrote:
> * H. Peter Anvin (hpa@zytor.com) wrote:
>> On 12/02/2009 02:57 PM, Mathieu Desnoyers wrote:
>>>>
>>>> TRACE_CLASS - Declares a class
>>>> TRACE_CLASS_EVENT - defines an event for said class
>>>> TRACE_EVENT - Declares a class and defines an event (as is today)
>>>
>>> Yep, it looks good! It's self-descriptive and don't require to explain
>>> what the thing is doing each time we refer to it. (however I feel a bit
>>> sad for Fred, Wilma and Barney) ;)
>>>
>>
>> Although you have to admit it's a bit confusing that:
>>
>> TRACE_EVENT = TRACE_CLASS + TRACE_CLASS_EVENT
>>
>> ... as opposed to ...
>>
>> TRACE_CLASS_EVENT = TRACE_CLASS + TRACE_EVENT
>>
>> -hpa
>
> Then I would say that TRACE_EVENT should probably not have the
> side-effect of declaring a globally-reuseable class. Maybe under the
> hood it could create a privately-named class, but I don't see how it can
> be re-used by following TRACE_CLASS_EVENT without causing confusion.
>
> I'd go for:
>
> TRACE_CLASS - Declares/defines a class
> TRACE_CLASS_EVENT - Declares/defines an event for said class
> TRACE_EVENT - Declares/defines a private class and declares/defines an event

Agreed, I'd rather like this naming. :-)

Acked-by: Masami Hiramatsu <mhiramat@redhat.com>

Thank you!

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com



\
 
 \ /
  Last update: 2009-12-03 04:25    [from the cache]
©2003-2011 Jasper Spaans