lkml.org 
[lkml]   [2009]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 3/5] tracing/events: modify irq print to new format
    On Mon, Jun 08, 2009 at 09:45:37PM -0400, Steven Rostedt wrote:
    > -#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
    > -#define show_softirq_name(val) \
    > - __print_symbolic(val, \
    > - softirq_name(HI), \
    > - softirq_name(TIMER), \
    > - softirq_name(NET_TX), \
    > - softirq_name(NET_RX), \
    > - softirq_name(BLOCK), \
    > - softirq_name(TASKLET), \
    > - softirq_name(SCHED), \
    > - softirq_name(HRTIMER), \
    > - softirq_name(RCU))
    > +#define softirq_name(sirq) sirq##_SOFTIRQ, #sirq
    > +#define show_softirq_name(val) \
    > + "%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s>", \
    > + softirq_name(HI), \
    > + softirq_name(TIMER), \
    > + softirq_name(NET_TX), \
    > + softirq_name(NET_RX), \
    > + softirq_name(BLOCK), \
    > + softirq_name(TASKLET), \
    > + softirq_name(SCHED), \
    > + softirq_name(HRTIMER), \
    > + softirq_name(RCU)

    This is a massive readability and maintainabilit regression over the
    old code. I now need to add a useless and counter-intuitive %d=%s,
    boilerplate for every new flag I add instead ofa simple line-line
    array entry.

    Also why does show_softirq_name get a val argument passed that's never
    used? And no, I don't think
    %d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s is an intuitive
    way to print an enum.



    \
     
     \ /
      Last update: 2009-06-10 12:03    [W:0.034 / U:59.760 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site