lkml.org 
[lkml]   [2009]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] perf_events: add event constraints support for Intel processors

    * Stephane Eranian <eranian@googlemail.com> wrote:

    > +struct evt_cstr {
    > + unsigned long idxmsk[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
    > + int code;
    > +};
    > +
    > +#define EVT_CSTR0(c, m) { .code = (c), .idxmsk[0] = (m) }
    > +#define EVT_CSTR_END { .code = 0, .idxmsk[0] = 0 }
    > +
    > +#define for_each_evt_cstr(e, c) \
    > + for((e) = (c); (e)->idxmsk[0]; (e)++)

    Nice patch - but the naming here absolutely sucked, so i changed
    evt_cstr, idxmsk, CSTR, etc. to something more palatable. Field names
    and abstractions in Linux code really need to be meaningful, and the
    code has to be readable and understandable. Wdntusabbrntslkthtinlnx :)

    Ingo


    \
     
     \ /
      Last update: 2009-10-09 16:03    [W:0.036 / U:0.232 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site