lkml.org 
[lkml]   [2009]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2 v3] tracing/events: provide string with undefined size support
    > @@ -417,18 +495,22 @@ static struct ftrace_event_call event_##call;				\
    > \
    > static void ftrace_raw_event_##call(proto) \
    > { \
    > + struct ftrace_str_offsets_##call __maybe_unused __str_offsets; \
    > struct ftrace_event_call *call = &event_##call; \
    > struct ring_buffer_event *event; \
    > struct ftrace_raw_##call *entry; \
    > unsigned long irq_flags; \
    > + int __str_size = 0; \
    > int pc; \
    > \
    > local_save_flags(irq_flags); \
    > pc = preempt_count(); \
    > \
    > + tstruct; \
    > + \
    > event = trace_current_buffer_lock_reserve(event_##call.id, \
    > - sizeof(struct ftrace_raw_##call), \
    > - irq_flags, pc); \
    > + sizeof(struct ftrace_raw_##call) + __str_size,\

    sizeof(*entry) will make it much shorter. ;)

    > + irq_flags, pc); \
    > if (!event) \
    > return; \
    > entry = ring_buffer_event_data(event); \



    \
     
     \ /
      Last update: 2009-04-19 08:17    [W:0.022 / U:31.688 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site