[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091009135552.GA1695@elte.hu>
Date: Fri, 9 Oct 2009 15:55:52 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Stephane Eranian <eranian@...glemail.com>
Cc: linux-kernel@...r.kernel.org, paulus@...ba.org,
a.p.zijlstra@...llo.nl, perfmon2-devel@...ts.sf.net,
Stephane Eranian <eranian@...il.com>
Subject: Re: [PATCH 2/2] perf_events: add event constraints support for
Intel processors
* Stephane Eranian <eranian@...glemail.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists