[Cbe-oss-dev] [PATCH 6/8] spufs: Remove the spu_context{, _nospu}_trace macros
Julio M. Merino Vidal
jmerino at ac.upc.edu
Fri Apr 25 22:52:26 EST 2008
On Fri, Apr 25, 2008 at 02:11:59PM +0200, Christoph Hellwig wrote:
> On Fri, Apr 25, 2008 at 12:07:27PM +0200, jmerino at ac.upc.edu wrote:
> > Drop the spu_context{,_nospu}_trace macros and use trace_mark directly.
> > The macros had few flexibility in the sense that they imposed all markers
> > to receive either a context pointer or a context+spu pointer pair.
> >
> > We must be able to log other information aside from these two types to get
> > really useful traces, and if we used macros, we'd need to add many more
> > to cover all cases.
> >
> > It is better to just use trace_mark by hand so that each marker can carry
> > its own format. Furthermore, it is expected that the kernel will gain
> > markers everywhere at some point, and having macros just in spufs while
> > the other code uses trace_mark will make things confusing.
>
> Using these macros means we have standard traces at hand easily. You
> are of course free to add more complex trace_marks in other places, but
> you'll also need more complicated than standard handles in that case.
But what does "standard traces" mean anyway? Some of the current markers
fail to capture, for example, incoming parameters due to the limitations
of the macros.
The macros break consistency at the price of (very few) extra simplicity.
Note that the lttng guys are adding trace_mark markers ~everywhere and,
AFAIK, these patches will eventually be integrated into mainline. If spufs
uses some obscure and non-standard macros, developers will surely be confused.
(E.g. grep will not work, as already happened to me.)
Also, if I add regular trace_marks for the cases where the current macros
cannot be used, I also expect confusion, because the code will use macros
in some places but not in others.
--
Julio M. Merino Vidal <jmerino at ac.upc.edu>
More information about the cbe-oss-dev
mailing list