lkml.org 
[lkml]   [2009]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] tracing/lockdep: turn lock->name into an array
    On Tue, Apr 14, 2009 at 01:01:10AM +0200, Ingo Molnar wrote:
    >
    > * Frederic Weisbecker <fweisbec@gmail.com> wrote:
    >
    > > TP_STRUCT__entry(
    > > - __field(const char *, name)
    > > + __array(char, name, LOCK_NAME_SIZE)
    > > __field(unsigned long, wait_usec)
    > > __field(unsigned long, wait_nsec_rem)
    > > ),
    >
    > Hm. These constants tend to grow - 25 will certainly be too narrow.
    > But increasing it increases the record size as well.


    Yeah, that's why I'm not sure about the right size.


    > I think we'll need an embedded __string() type, with a length field
    > (but still also zero-delimited, for convenience), hm?


    Indeed. It tends to be a repetitive pattern.
    Also, may be we can use an undefined array size on the structure
    for the __string field.
    We already do so with the old style trace_printk entry and may be
    some others. Extending TRACE_EVENT to support it shouldn't be a big deal.

    I'll just wait for Steven changes and try to do that.


    > Ingo



    \
     
     \ /
      Last update: 2009-04-14 02:27    [W:4.118 / U:0.392 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site