[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2 of 3] xen: tracing: introduce per-scheduler trace event IDs
On Tue, 2012-12-04 at 18:53 +0000, George Dunlap wrote: > > +/* > + * Credit2 tracing events ("only" 512 available!). Check > + * include/public/trace.h for more details. > + */ > +#define TRC_CSCHED2_EVENT(_e) ((TRC_SCHED_CLASS| > TRC_MASK_CSCHED2) + _e) > > I think I would make this generic, and put it in trace.h > Sounds good. Will do. > -- maybe something like this? (Haven't run this through a compiler) > > #define TRC_SCHED_CLASS_EVT(_c, _e) \ > > ((TRC_SCHED_CLASS|(TRC_SCHED_##_c<<TRC_SCHED_MASK_SHIFT))+(_e&TRC_SCHED_CLASS_MASK)) > I'll try it and resend. > +#define TRC_SCHED_ID_BITS 3 > +#define TRC_SCHED_MASK_SHIFT (TRC_SUBCLS_SHIFT - > TRC_SCHED_ID_BITS) > + > +#define TRC_MASK_CSCHED (0 << TRC_SCHED_MASK_SHIFT) > +#define TRC_MASK_CSCHED2 (1 << TRC_SCHED_MASK_SHIFT) > +#define TRC_MASK_SEDF (2 << TRC_SCHED_MASK_SHIFT) > +#define TRC_MASK_ARINC653 (3 << TRC_SCHED_MASK_SHIFT) > > I don't think "mask" is right here -- these aren't masks, they're > numerical values. :-) If we use something like the #define above, > then we can do: > > #define TRC_SCHED_CSCHED 0 > #define TRC_SCHED_CSCHED2 > /*...*/ > I agree, bad name. (re "mask"). :-) Thanks and Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |