lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] tracing/lockdep: turn lock->name into an array
    Date
    Hi

    > Impact: allow filtering by lock name / fix module tracing
    >
    > Currently, the "lock acquired" event is traced using a TRACE_EVENT.
    > But we can't use the char * type for the name without risking to
    > dereference a freed pointer. A lock name can come from a module
    > towards lockdep and it is risky to only store its address because we
    > defer its name printing.

    When released lockdep string table?
    I guess it only happend at module unloading. if so, we should consider to
    make delayed string table freeing at module unloading.

    My point is, module unloading is rare event. thus meking pointer safe mechanism
    widely avoid string copy.

    IOW, if not, ringbuffer is filled tons string. it kill the merit of binary
    buffer and current design.


    > That's why this patch uses a fixed array size and copy the name.
    > Also it lets us filter the lock name because the event filtering
    > doesn't handle the char pointers. Such support is not needed yet since
    > the events don't use it for now because it is rarely easy to keep track
    > of a string while we defer its output.
    >
    > Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>





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